Commit Graph

186227 Commits

Author SHA1 Message Date
Daniel Sanders d7eba31508 [mips] Remove remaining use of MipsCC::intArgRegs() in favour of MipsABIInfo::GetByValArgRegs() and MipsABIInfo::GetVarArgRegs()
Summary: Depends on D6112

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6113

llvm-svn: 221521
2014-11-07 12:21:37 +00:00
Evgeniy Stepanov 70075620b3 [sanitizer] Never remove the last frame off the stack trace.
It can only make it worse.

llvm-svn: 221520
2014-11-07 12:03:07 +00:00
Daniel Sanders 4f1bedaa47 [mips] Remove MipsCC::getRegVT(). NFC
Summary: It's no longer used.

Reviewers: vmedic, theraven

Reviewed By: theraven

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6112

llvm-svn: 221519
2014-11-07 12:02:59 +00:00
Daniel Sanders cfad1e3fca [mips] Remove MipsCC::analyzeCallOperands in favour of CCState::AnalyzeCallOperands. NFC
Summary:
In addition to the usual f128 workaround, it was also necessary to provide
a means of accessing ArgListEntry::IsFixed.

Reviewers: theraven, vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6111

llvm-svn: 221518
2014-11-07 11:43:49 +00:00
Daniel Sanders 41a64c407f [mips] Move SpecialCallingConv to MipsCCState and use it from tablegen-erated code. NFC
Summary:
In the long run, it should probably become a calling convention in its own
right but for now just move it out of
MipsISelLowering::analyzeCallOperands() so that we can drop this function
in favour of CCState::AnalyzeCallOperands().

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6085

llvm-svn: 221517
2014-11-07 11:10:48 +00:00
Daniel Sanders f3096a1c8d [mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.
Summary:
CCState objects already carry this information in their isVarArg() method.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6084

llvm-svn: 221516
2014-11-07 10:45:16 +00:00
Renato Golin d4ac2ba618 Move ARM failure from FIXME to XFAIL
llvm-svn: 221515
2014-11-07 10:30:53 +00:00
Jay Foad 52695da39c llvm-symbolizer: teach it about PowerPC64 ELF function descriptors
Summary:
Teach llvm-symbolizer about PowerPC64 ELF function descriptors. Symbols in the .opd section point to function descriptors, the first word of which is a pointer to the real function. For the purposes of symbolizing we pretend that the symbol points directly to the function.

This is enough to get decent function names in stack traces for unoptimized binaries, which fixes the sanitizer print-stack-trace test on PowerPC64 Linux.

Reviewers: kcc, willschm, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6110

llvm-svn: 221514
2014-11-07 09:08:39 +00:00
David Majnemer 2098b86f64 SCCP: overdefined calls cannot become constant
We would attempt to fold away a call instruction which had been marked
overdefined.  However, it's not valid to transition to constant from
overdefined.

This fixes PR21512.

llvm-svn: 221513
2014-11-07 08:54:19 +00:00
Johannes Doerfert 80ef110cca [Refactor][NFC] Generalize the creation of ScopArrayInfo objects.
Differential Revision: http://reviews.llvm.org/D6031

llvm-svn: 221512
2014-11-07 08:31:31 +00:00
David Majnemer 1fb1a044e5 CodeGen, Itanium: Properly dllimport RTTI data
We would blindly assume that RTTI data should have the same linkage as
the vtable because we didn't think the RTTI data was external.  This
oversight stemmed because we didn't take dllimport into account.

This fixes PR21512.

llvm-svn: 221511
2014-11-07 07:26:38 +00:00
Justin Hibbits 771c132e0f Add Position-independent Code model Module API.
Summary:
This makes PIC levels a Module flag attribute, which can be queried by the
backend.  The flag is named `PIC Level`, and can have a value of:

  0 - Backend-default
  1 - Small-model (-fpic)
  2 - Large-model (-fPIC)

These match the `-pic-level' command line argument for clang, and the value of the
preprocessor macro `__PIC__'.

Test Plan:
New flags tests specific for the 'PIC Level' module flag.
Tests to be added as part of a future commit for PowerPC, which will use this new API.

Reviewers: rafael, echristo

Reviewed By: rafael, echristo

Subscribers: rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D5882

llvm-svn: 221510
2014-11-07 04:46:10 +00:00
Rafael Espindola 97ae14e166 Use llvm::StringRefMemoryObject NFC.
llvm-svn: 221509
2014-11-07 04:24:12 +00:00
Rui Ueyama a81cb0594b Fix Mach-O unit tests breakage on Windows
Mach-O normalized file reader assumes that the entire file is aligned
to a large boundary. If the in-memory file is not aligned properly, it will
abort with an assertion failure in read32/read64. This patch forces the
in-memory file for the unit test to be aligned at 64-byte boundary.

I found these tests are failing on Windows, but theoretically they could
fail on other platform.

llvm-svn: 221508
2014-11-07 02:54:52 +00:00
Ahmed Bougacha 72001cf287 [AArch64] Keep flags on condition vreg when instantiating a CB branch.
Reversing a CB* instruction used to drop the flags on the condition. On the
included testcase, this lead to a read from an undefined vreg.
Using addOperand keeps the flags, here <undef>.

Differential Revision: http://reviews.llvm.org/D6159

llvm-svn: 221507
2014-11-07 02:50:00 +00:00
Rui Ueyama 2685de1077 Disable a Mach-O test on Windows that depends on Unix path separator.
llvm-svn: 221506
2014-11-07 01:51:00 +00:00
Rui Ueyama 81d9e09090 Add missing -target triple to ELF tests.
llvm-svn: 221505
2014-11-07 01:45:32 +00:00
Rui Ueyama 6dca8d1c36 XFAIL elf/demangle.test on Windows.
Because LLD on that platform can't demangle symbols.

llvm-svn: 221504
2014-11-07 01:30:49 +00:00
Rafael Espindola 1d7d4eb15c Use a StringRefMemoryObject. NFC.
llvm-svn: 221503
2014-11-07 01:09:51 +00:00
Rafael Espindola bd604f270a Use StringRefMemoryObject. NFC.
llvm-svn: 221502
2014-11-07 00:52:15 +00:00
David Majnemer bf93e7c7d3 LoopVectorize: Don't assume pointees are sized
A pointer's pointee might not be sized: the pointee could be a function.

Report this as IK_NoInduction when calculating isInductionVariable.

This fixes PR21508.

llvm-svn: 221501
2014-11-07 00:31:14 +00:00
Rui Ueyama 2d220ab9b4 [PECOFF] Improve subsystem inference
If /subsystem option is not given, the linker needs to infer the
subsystem based on the entry point symbol. If it fails to infer
that, the linker should error out on it.

LLD was almost correct, but it would fail to infer the subsystem
if the entry point is specified with /entry. This is because the
subsystem inference was coupled with the entry point function
searching (if no entry point name is specified, the linker needs
to find the right entry name).

This patch makes the subsystem inference an independent pass to
fix the issue. Now, as long as an entry point function is defined,
LLD can infer the subsystem no matter how it resolved the entry
point.

I don't think scanning all the defined symbols is fast, although
it shouldn't be that slow. The file class there does not provide
any easy way to find an atom by name, so this is what we can do
at this moment. I'd like to revisit this later to make it more
efficient.

llvm-svn: 221499
2014-11-06 23:50:48 +00:00
David Majnemer c1eca5ad7c InstCombine: Rely on cmpxchg's return code when it's strong
Comparing the result of a cmpxchg instruction can be replaced with an
extractvalue of the cmpxchg success indicator.

llvm-svn: 221498
2014-11-06 23:23:30 +00:00
Rafael Espindola 89cb407729 Remove unused variable. NFC.
llvm-svn: 221497
2014-11-06 23:16:57 +00:00
Greg Clayton 860fac5338 Fixes so tests compile and run remotely.
Fixes include:
- dont set or change LDFLAGS, but set LD_EXTRAS instead
- fix compilation errors for iOS based builds with objective C code
    - fix test cases to create classes instead of relying on classes from AppKit 
    - rename things where it makes sense

llvm-svn: 221496
2014-11-06 22:59:28 +00:00
Rafael Espindola 84cf83f240 Don't repeat names in comments. NFC.
llvm-svn: 221495
2014-11-06 22:57:10 +00:00
Greg Clayton ef95321229 Changed program to go along with the previous commit to allow this test to be run remotely via lldb-platform.
llvm-svn: 221494
2014-11-06 22:56:56 +00:00
Greg Clayton f324020b7c Fix the test to not have to run the binary separately first to get the golden output, use the process STDOUT instead.
This helps this test be able to be run remotely.

llvm-svn: 221493
2014-11-06 22:56:15 +00:00
Greg Clayton 2dd4365038 Make sure stderr is filtered out in case xcodebuild or xcrun print errors when getting the SDK path and use xcrun to find the SDK path.
llvm-svn: 221492
2014-11-06 22:55:09 +00:00
Simon Atanasyan 60e1a79242 [ELF][yaml2obj] Handle additional MIPS specific st_other field flags
The ELF symbol `st_other` field might contain additional flags besides
visibility ones. This patch implements support for some MIPS specific
flags.

llvm-svn: 221491
2014-11-06 22:46:24 +00:00
Rafael Espindola e2541bd60e Factor out call to push_back. NFC.
llvm-svn: 221490
2014-11-06 22:39:16 +00:00
Simon Pilgrim 615ab8e721 [X86][SSE] Vector integer/float conversion memory folding (cvttps2dq / cvttpd2dq)
Fixed an issue with the (v)cvttps2dq and (v)cvttpd2dq instructions being incorrectly put in the 2 source operand folding tables instead of the 1 source operand and added the missing SSE/AVX versions.

Also added missing (v)cvtps2dq and (v)cvtpd2dq instructions to the folding tables.

Differential Revision: http://reviews.llvm.org/D6001

llvm-svn: 221489
2014-11-06 22:15:41 +00:00
Ahmed Bougacha b5367eeea3 [X86] Add VFMADDSUB cases for the 213->231 custom inserter.
Also add tests for vfmadd/vfmsub.

llvm-svn: 221488
2014-11-06 22:04:15 +00:00
Ahmed Bougacha 9152361d73 [X86] Add missing FMA3 VFMADDSUB in the emitter.
Also reuse the fma4 intrinsic test to cover fma3 instructions too.

llvm-svn: 221487
2014-11-06 21:58:11 +00:00
Enrico Granata f35bc63220 This is a large, but clearical, commit that enables the C++ formatters to take on the additional TypeSummaryOptions argument. It is still not used for anything, but it is now there. Adding support for this extra argument to Python formatters will follow suit
llvm-svn: 221486
2014-11-06 21:55:30 +00:00
David Majnemer 504165df71 Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize
mingw lies about the size of a function's AuxFunctionDefinition.  Ignore
the field and rely on our heuristic to determine the symbol's size.

llvm-svn: 221485
2014-11-06 21:46:55 +00:00
Ahmed Bougacha d1e71108d0 [X86] Split FMA4 RM tests into a separate file. NFC.
While there, remove useless comments.

llvm-svn: 221484
2014-11-06 21:46:23 +00:00
Tobias Grosser 81641db93e Fix formatting
llvm-svn: 221483
2014-11-06 21:25:54 +00:00
Enrico Granata c1247f5596 Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way
Two flags are introduced:
- preferred display language (as in, ObjC vs. C++)
- summary capping (as in, should a limit be put to the amount of data retrieved)

The meaning - if any - of these options is for individual formatters to establish
The topic of a subsequent commit will be to actually wire these through to individual data formatters

llvm-svn: 221482
2014-11-06 21:23:20 +00:00
Frederic Riss 442293e83f Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...
... instead of a DIScope that might wrap something that's not actually
a DIScope (eg. a DIGlobalVariable);

llvm-svn: 221481
2014-11-06 21:12:06 +00:00
Rafael Espindola b7a4505a3f Base check on the section name, not the variable name.
The variable is private, so the name should not be relied on. Also, the
linker uses the sections, so asan should too when trying to avoid causing
the linker problems.

llvm-svn: 221480
2014-11-06 20:01:34 +00:00
Tobias Grosser 8b5344fda2 Explicitly annotate loops we want to run thread-parallel
We introduces a new flag -polly-parallel and use it to annotate the for-nodes in
the isl ast that we want to execute thread parallel (e.g., using OpenMP). We
previously already emmitted openmp annotations, but we did this for various
kinds of parallel loops, including some which we can not run in parallel.

With this patch we now have three annotations:

  1) #pragma known-parallel [reduction]
  2) #pragma omp for
  3) #pragma simd

meaning:

  1) loop has no loop carried dependences
  2) loop will be executed thread-parallel
  3) loop can possibly be vectorized

This patch introduces 1) and reduces the use of 2) to only the cases where we
will actually generate thread parallel code.

It is in preparation of openmp code generation in our isl backend.

Legacy:

- We also have a command line option -enable-polly-openmp. This option controls
  the OpenMP code generation in CLooG. It will become an alias of
  -polly-parallel after the CLooG code generation has been dropped.

http://reviews.llvm.org/D6142

llvm-svn: 221479
2014-11-06 19:35:21 +00:00
Nick Kledzik babee83257 remove unneeded { }
llvm-svn: 221478
2014-11-06 19:33:59 +00:00
Nick Kledzik 24f504001d [mach-o] Add support for -force_load option
The darwin linker has two ways to force all members of an archive to be loaded.
The -all_load option applies to all static libraries.  The -force_load takes
a path to a library and just that library's members are force loaded.

llvm-svn: 221477
2014-11-06 19:33:57 +00:00
Sean Callanan 4c508df925 Handle types from the runtime that conform to
protocols.

<rdar://problem/18883778>

llvm-svn: 221476
2014-11-06 19:26:10 +00:00
Lang Hames bcdd304cbb [RegAlloc] Remove reference to the trivial spiller in test case.
This test case was never actually testing the trivial spiller: the -spiller
option has not been hooked up for a while now.

llvm-svn: 221475
2014-11-06 19:24:18 +00:00
Lang Hames cdd9077f3a [RegAlloc] Kill off the trivial spiller - nobody is using it any more.
llvm-svn: 221474
2014-11-06 19:12:38 +00:00
Kevin Enderby 3b47e1f7e2 [mach-o] Update test case to work with latest llvm-objdump output for ARM thumb
code.  Same basic change that was done in r218429 for ARM code.

Where the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler is now
plumbed in with r221470 from the llvm trunk.

llvm-svn: 221473
2014-11-06 19:12:28 +00:00
Michael Liao 736bac6482 Indentation fixes
llvm-svn: 221472
2014-11-06 19:05:57 +00:00
Frederic Riss 051cd75b6d Try to appease MSVC buildbots after r221466.
llvm-svn: 221471
2014-11-06 19:00:47 +00:00