summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: Use the scope of the function declaration, if any, to name a ↵David Blaikie2014-06-065-12/+14
| | | | | | | | | | function in DWARF pubnames This ensures that member functions, for example, are entered into pubnames with their fully qualified name, rather than inside the global namespace. llvm-svn: 210379
* DebugInfo: pubnames: include file-local (static or anonymous namespace) ↵David Blaikie2014-06-065-75/+200
| | | | | | | | | variables and anonymous namespaces themselves. Still some issues with name qualification, FIXMEs added to test cases and fixes will come next. llvm-svn: 210378
* InstCombine: Canonicalize addrspacecast between different element typesJingyue Wu2014-06-065-17/+125
| | | | | | | | | | | | | | | | addrspacecast X addrspace(M)* to Y addrspace(N)* --> bitcast X addrspace(M)* to Y addrspace(M)* addrspacecast Y addrspace(M)* to Y addrspace(N)* Updat all affected tests and add several new tests in addrspacecast.ll. This patch is based on http://reviews.llvm.org/D2186 (authored by Matt Arsenault) with fixes and more tests. llvm-svn: 210375
* MC: prevent early DCE of empty sectionsSaleem Abdulrasool2014-06-0611-63/+76
| | | | | | | | | | | | | | | | Prevent the early elimination of sections in the object writer. There may be references to the section itself by other symbols, which may potentially not be possible to resolve. ML (Visual Studio's Macro Assembler) also seems to retain empty sections. The elimination of symbols and sections which are unused should really occur at the link phase. This will not cause any change in the resulting binary, simply in the generated object files. The adjustments to the other unit tests account for the fluctuating section index caused by the appearance of sections which were previously discarded. llvm-svn: 210373
* X86: Don't turn shifts into ands if there's another use that may not check ↵Benjamin Kramer2014-06-062-1/+14
| | | | | | | | for equality. Fixes PR19964. llvm-svn: 210371
* Fix a few issues with comdat handling on COFF.Rafael Espindola2014-06-0617-184/+138
| | | | | | | | | | | | | | | | | | | | | * Section association cannot use just the section name as many sections can have the same name. With this patch, the comdat symbol in an assoc section is interpreted to mean a symbol in the associated section and the mapping is discovered from it. * Comdat symbols were not being set correctly. Instead we were getting whatever was output first for that section. A consequence is that associative sections now must use .section to set the association. Using .linkonce would not work since it is not possible to change a sections comdat symbol (it is used to decide if we should create a new section or reuse an existing one). This includes r210298, which was reverted because it was asserting on an associated section having the same comdat as the associated section. llvm-svn: 210367
* Have TargetSelectionDAGInfo take a DataLayout initializer rather thanEric Christopher2014-06-0613-22/+16
| | | | | | a TargetMachine since the only thing it wants is DataLayout. llvm-svn: 210366
* Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-24/+24
| | | | | | | | | | | | | | | | | These checks were accidentally skipping the 0x prefix in the hex offsets, then cunningly ignoring the prefix in the use of those captured values. Except in the case of the unit length, where the match was only matching the leading '0' before the x in the 0x prefix, then matching that against the length. We can't actually express the length association here, as the length field in the Compile Unit header does not include the length field itself, but the length field in the pubnames section /does/ include the size of the length field in the Compile Unit header - so the two numbers are actually 4 bytes different. Just skip matching that. llvm-svn: 210364
* Fix a typo made in Programmer's Manual made in r210354. SpottedDan Liew2014-06-061-1/+1
| | | | | | by Paul Robinson. llvm-svn: 210363
* Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-061-88/+1
| | | | | | | | | | | | | | | | | This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4 and data4 in DWARF3 and below. Since then we've updated DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway. Granted this still differs between DWARF 3 and DWARF 4 (FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile testing that codepath again here. It's covered adequately in many other test cases. And while I'm here, don't hardcode the byte size of the compile unit - it's not relevant to this test and just makes it brittle if/when anything changes in the way this CU is emitted. llvm-svn: 210362
* Fixed a bug in lowering shuffle_vectors to insertpsFilipe Cabecinhas2014-06-063-11/+35
| | | | | | | | | | | | | | Summary: We were being too strict and not accounting for undefs. Added a test case and fixed another one where we improved codegen. Reviewers: grosbach, nadav, delena Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4039 llvm-svn: 210361
* Mention the IRBuilder in Programmer's Manual with a few small examples.Dan Liew2014-06-061-1/+36
| | | | llvm-svn: 210354
* Fix typo in a test from r210342.Michael Zolotukhin2014-06-061-1/+1
| | | | llvm-svn: 210343
* [SLP] Enable vectorization of GEP expressions.Michael Zolotukhin2014-06-062-0/+128
| | | | | | | | The use cases look like the following: x->a = y->a + 10 x->b = y->b + 12 llvm-svn: 210342
* [PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endianBill Schmidt2014-06-062-3/+100
| | | | | | | | | | | | | | | This patch fixes a couple of lowering issues for little endian PowerPC. The code for lowering BUILD_VECTOR contains a number of optimizations that are only valid for big endian. For now, we disable those optimizations for correctness. In the future, we will add analogous optimizations that are correct for little endian. When lowering a SHUFFLE_VECTOR to a VPERM operation, we again need to make the now-familiar transformation of swapping the input operands and complementing the permute control vector. Correctness of this transformation is tested by the accompanying test case. llvm-svn: 210336
* Slight language tweak from Jonathan Humphreys.Pekka Jaaskelainen2014-06-061-1/+1
| | | | llvm-svn: 210327
* Touch configure to force clang's config.h.in reconfiguration on the build ↵Alp Toker2014-06-061-1/+1
| | | | | | | | | servers Gutted that this is needed, folks who care about keeping the legacy build system alive should sort this out already. llvm-svn: 210321
* lld test for configure & makeIain Sandoe2014-06-061-0/+9
| | | | | | | | r210177 added lld Makefiles, r210245 added automatic build when the source is present. This revision completes the set by adding the lld test and unittests to the check-all target. llvm-svn: 210318
* Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on ↵Timur Iskhodzhanov2014-06-064-67/+22
| | | | | | Windows llvm-svn: 210317
* [yaml2obj][obj2yaml] Support ELF symbol's visibility flags ↵Simon Atanasyan2014-06-065-0/+146
| | | | | | (default/hidden/protected). llvm-svn: 210316
* Added select flavour for ABS and NEG(ABS)Dinesh Dwivedi2014-06-063-20/+532
| | | | | | | | | | | | | | | | This patch can identify ABS(X) ==> (X >s 0) ? X : -X and (X >s -1) ? X : -X ABS(X) ==> (X <s 0) ? -X : X and (X <s 1) ? -X : X NABS(X) ==> (X >s 0) ? -X : X and (X >s -1) ? -X : X NABS(X) ==> (X <s 0) ? X : -X and (X <s 1) ? X : -X and can transform ABS(ABS(X)) -> ABS(X) NABS(NABS(X)) -> NABS(X) Differential Revision: http://reviews.llvm.org/D3658 llvm-svn: 210312
* Make LINK_POLLY_INTO_TOOLS work with the CMake buildAlp Toker2014-06-061-3/+3
| | | | | | | | | The option check was being performed after config.h/llvm-config.h substitution, generating incorrect macro definitions. Fixes PR19614. llvm-svn: 210311
* Fix PR19657 (scalar loads not combined into vector load)Karthik Bhat2014-06-062-2/+87
| | | | | | | | If we have common uses on separate paths in the tree; process the one with greater common depth first. This makes sure that we do not assume we need to extract a load when it is actually going to be part of a vectorized tree. Review: http://reviews.llvm.org/D3800 llvm-svn: 210310
* Remove clang-specific libxml2 check from CMakeAlp Toker2014-06-061-19/+0
| | | | | | | | | | | clang's own CMake setup handles this as of r210308. The CMAKE_CROSSCOMPILING special-case will no longer be hard-coded. This was clearly site-specific to someone's local configuration and should be passed in at configure time if needed with e.g. -DLIBXML2_LIBRARIES=... (the libxml2 target I tried here doesn't even support liblzma so it's *way* off). llvm-svn: 210309
* config.h: remove clang-specific macro definitionsAlp Toker2014-06-062-30/+0
| | | | | | These had no business in LLVM core. llvm-svn: 210307
* Allow aliases to be unnamed_addr.Rafael Espindola2014-06-0620-53/+75
| | | | | | | | | | | | | | | | | | Alias with unnamed_addr were in a strange state. It is stored in GlobalValue, the language reference talks about "unnamed_addr aliases" but the verifier was rejecting them. It seems natural to allow unnamed_addr in aliases: * It is a property of how it is accessed, not of the data itself. * It is perfectly possible to write code that depends on the address of an alias. This patch then makes unname_addr legal for aliases. One side effect is that the syntax changes for a corner case: In globals, unnamed_addr is now printed before the address space. llvm-svn: 210302
* Fix markup for -debug-only optionAlexey Samsonov2014-06-051-1/+2
| | | | llvm-svn: 210300
* Fix null dereference with -debug-only=dwarfdebugAlexey Samsonov2014-06-051-2/+5
| | | | llvm-svn: 210299
* Correctly set the comdat symbol on COFF.Rafael Espindola2014-06-054-22/+67
| | | | | | | | | | | | | | | | | | | | | We extended the .section syntax to allow multiple sections with the same name but different comdats, but currently we don't make sure that the output section has that comdat symbol. That happens to work with the code llc produces currently because it looks like .section secName, "dr", one_only, "COMDATSym" .globl COMDATSym COMDATSym: .... but that is not very friendly to anyone coding in assembly or even to llc once we get comdat support in the IR. This patch changes the coff object writer to make sure the comdat symbol is output just after the section symbol, as required by the coff spec. llvm-svn: 210298
* [PPC64LE] Add test case for r210282 commitBill Schmidt2014-06-051-0/+17
| | | | | | | | Chandler correctly pointed out that I need an LLVM IR test for r210282, which modified the vperm -> shuffle transform for little endian PowerPC. This patch provides that test. llvm-svn: 210297
* Remove X86Subtarget from the X86FrameLowering constructor sinceEric Christopher2014-06-052-15/+11
| | | | | | | we can just pass in the values we already know and we're not caching the subtarget anymore. llvm-svn: 210292
* Fixed several correctness issues in SeparateConstOffsetFromGEPJingyue Wu2014-06-053-259/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most issues are on mishandling s/zext. Fixes: 1. When rebuilding new indices, s/zext should be distributed to sub-expressions. e.g., sext(a +nsw (b +nsw 5)) = sext(a) + sext(b) + 5 but not sext(a + b) + 5. This also affects the logic of recursively looking for a constant offset, we need to include s/zext into the context of the searching. 2. Function find should return the bitwidth of the constant offset instead of always sign-extending it to i64. 3. Stop shortcutting zext'ed GEP indices. LLVM conceptually sign-extends GEP indices to pointer-size before computing the address. Therefore, gep base, zext(a + b) != gep base, a + b Improvements: 1. Add an optimization for splitting sext(a + b): if a + b is proven non-negative (e.g., used as an index of an inbound GEP) and one of a, b is non-negative, sext(a + b) = sext(a) + sext(b) 2. Function Distributable checks whether both sext and zext can be distributed to operands of a binary operator. This helps us split zext(sext(a + b)) to zext(sext(a) + zext(sext(b)) when a + b does not signed or unsigned overflow. Refactoring: Merge some common logic of handling add/sub/or in find. Testing: Add many tests in split-gep.ll and split-gep-and-gvn.ll to verify the changes we made. llvm-svn: 210291
* Remove caching of the subtarget for X86FrameLowering.Eric Christopher2014-06-052-6/+9
| | | | llvm-svn: 210290
* Remove duplicate copy of InstrItineraryData from the TargetMachine,Eric Christopher2014-06-052-3/+1
| | | | | | it's already on the subtarget. llvm-svn: 210289
* Adding explicit triples to the ARM jumptable testsTom Roeder2014-06-051-2/+2
| | | | llvm-svn: 210288
* Add a testcase where there is an overflow when combining two constants.Rafael Espindola2014-06-051-0/+10
| | | | | | I noticed that a proposed optimization would have prevented this. llvm-svn: 210287
* Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.Kevin Enderby2014-06-059-7/+486
| | | | | | | | | | | | | | | This is a first step in seeing if it is possible to make llvm-nm produce the same output as darwin's nm(1). Darwin's default format is bsd but its -m output prints the longer Mach-O specific details. For now I added the "-format darwin" to do this (whos name may need to change in the future). As there are other Mach-O specific flags to nm(1) which I'm hoping to add some how in the future. But I wanted to see if I could get the correct output for -m flag using llvm-nm and the libObject interfaces. I got this working but would love to hear what others think about this approach to getting object/format specific details printed with llvm-nm. llvm-svn: 210285
* [PPC64LE] Correct vperm -> shuffle transform for little endianBill Schmidt2014-06-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in cfe commit r210279, the correct little-endian semantics for the vec_perm Altivec interfaces are implemented by reversing the order of the input vectors and complementing the permute control vector. This converts the desired permute from little endian element order into the big endian element order that the underlying PowerPC vperm instruction uses. This is represented with a ppc_altivec_vperm intrinsic function. The instruction combining pass contains code to convert a ppc_altivec_vperm intrinsic into a vector shuffle operation when the intrinsic has a permute control vector (mask) that is a constant. However, the vector shuffle operation assumes that vector elements are in natural order for their endianness, so for little endian code we will get the wrong result with the existing transformation. This patch reverses the semantic change to vec_perm that was performed in altivec.h by once again swapping the input operands and complementing the permute control vector, returning the element ordering to little endian. The correctness of this code is tested by the new perm.c test added in a previous patch, and by other tests in the test suite that fail without this patch. llvm-svn: 210282
* Removing spurious dependency of IPO on JumpInstrTablesTom Roeder2014-06-051-1/+0
| | | | llvm-svn: 210281
* Add a new attribute called 'jumptable' that creates jump-instruction tables ↵Tom Roeder2014-06-0540-8/+1109
| | | | | | | | | | | | for functions marked with this attribute. It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables. This also adds backend support for generating the jump-instruction tables on ARM and X86. Note that since the jumptable attribute creates a second function pointer for a function, any function marked with jumptable must also be marked with unnamed_addr. llvm-svn: 210280
* Document how to select build configuration with Visual C++ IDE or command line.Yaron Keren2014-06-051-0/+3
| | | | llvm-svn: 210273
* [PPC64LE] Temporarily disable VSX support in little-endian modeBill Schmidt2014-06-051-0/+5
| | | | | | | | | | This is a preliminary patch for the PowerPC64LE support. In stage 1 of the vector support, we will support the VMX (Altivec) instruction set, but will not yet support the VSX instructions. This is merely a staging issue to provide functional vector support as soon as possible. llvm-svn: 210271
* [asancov] Fix coverage line info some more.Evgeniy Stepanov2014-06-052-19/+55
| | | | | | | Now it should always point to the opening brace of the function (in -asan-coverage=1 mode). llvm-svn: 210266
* Add missing const specifier to a const method.Evgeniy Stepanov2014-06-052-2/+2
| | | | llvm-svn: 210265
* XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as wellUlrich Weigand2014-06-051-1/+1
| | | | llvm-svn: 210264
* [SystemZ] Do not install IfConverter pass at -O0Ulrich Weigand2014-06-051-1/+2
| | | | | | | | When not optimizing, do not run the IfConverter pass, this makes debugging more difficult (and causes a testsuite failure in DebugInfo/unconditional-branch.ll). llvm-svn: 210263
* [mips] Modify long branch for NaCl:Sasa Stankovic2014-06-052-6/+64
| | | | | | | | | * Move the instruction that changes sp outside of the branch delay slot. * Bundle-align the target of indirect branch. Differential Revision: http://llvm-reviews.chandlerc.com/D3928 llvm-svn: 210262
* Prevent hoisting the instruction whose def might be clobbered by the terminator.Sasa Stankovic2014-06-052-4/+155
| | | | llvm-svn: 210261
* [mips] Fix triple.Matheus Almeida2014-06-052-2/+2
| | | | | | Mips2 is a 32-bit architecture. llvm-svn: 210254
* lld (build with configur and make) Enable buildIain Sandoe2014-06-051-3/+3
| | | | | | | r210177 added Makefiles to the lld project. This revision enables the automatic build of lld when the sources are found in tools/lld. llvm-svn: 210245
OpenPOWER on IntegriCloud