summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Move more self-contained functionality away from tools/opt/opt.cppEli Bendersky2014-02-12
| | | | | | | BreakpointPrinter moves to its own module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201242 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-12
| | | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201241 91177308-0d34-0410-b5e6-96231b3b80d8
* Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-12
| | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201237 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.NAKAMURA Takumi2014-02-12
| | | | | | | | | | | | | | | I found that swapping the order of some header files helped fix a build issue that we're seeing on mingw32. Without the swap, windows.h was being included before _WIN32_WINNT was being defined and the CreateHardLinkW function was #ifdef'd out. It looks like the header is mainly used to get the SHGetFolderPathW function, so I don't think that there'll be much fallout from the switch. Suggested by Alex Crichton. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201230 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tablegen() macro to check needed variablesNAKAMURA Takumi2014-02-12
| | | | | | | | | | | This macro depends on several variables to be set in the calling context. Check them and report an error if they are not set. Without this, custom commands may be silently specified that will fail at build time. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201229 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Always implement both versions of isTruncateFree and add a sanity check.Benjamin Kramer2014-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201222 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove special case filtering for instructions with lock prefix as they are ↵Craig Topper2014-02-12
| | | | | | all marked with isCodeGenOnly already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201216 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear ↵Craig Topper2014-02-12
| | | | | | from the disassembler table build without custom filtering code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201215 91177308-0d34-0410-b5e6-96231b3b80d8
* [PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.NAKAMURA Takumi2014-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201211 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case I forgot to 'add' for r201126.Craig Topper2014-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201207 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded includeMatt Arsenault2014-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201201 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfUnit: Include type unit's file strings in the defining compile unit's ↵David Blaikie2014-02-12
| | | | | | | | | | file_names table There's still one piece missing here, which is adding the DW_AT_stmt_list to the type unit that refer's to the compile unit's line table. Working on that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201198 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some formatting in my last commit (r201196)David Blaikie2014-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201197 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfUnit: Provide a reference to a defining DwarfCompileUnit from ↵David Blaikie2014-02-12
| | | | | | | | | DwarfTypeUnit. Type units need to insert their file strings into the compile unit's line/file table. This is preliminary work to that end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201196 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfUnit: Refactor DW_AT_file creation into a common function.David Blaikie2014-02-12
| | | | | | | | This is preliminary work to fix type unit file strings so they appear in their originating CU's line table - but it's also just good/simple cleanup, so I'm committing it ahead of time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201195 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfUnit: Replace unnecessary conditionals with asserts.David Blaikie2014-02-11
| | | | | | | | We used to be pretty vague about what debug entities were what, with many conditionals to silently drop/skip/accept things. These don't seem to be relevant anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201194 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak ARM fastcc by adopting these two AAPCS rules:Evan Cheng2014-02-11
| | | | | | | | | | | | | | | * CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers * When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g. 7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various calling conventions. rdar://16039676 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201193 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r201180 with an additional error path.Adrian Prantl2014-02-11
| | | | | | | | | | | | Debug info: Emit values in subregisters that do not have a separate DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201190 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug info: Emit values in subregisters that do not have a separate"Adrian Prantl2014-02-11
| | | | | | This reverts commit r201179 for buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201188 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-11
| | | | | | | | | | when it's unneeded This comes up in empty files or files containing #file directives that never reference the actual source file name. Came up in a small test of line tables I was playing with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201187 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Remove dependence on file numbering in the line table.David Blaikie2014-02-11
| | | | | | | | These tests were unnecessarily sensitive to the presence and ordering of elements in the line table file_names list which will break on a future change I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201185 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaceAdrian Prantl2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201181 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Emit values in subregisters that do not have a separateAdrian Prantl2014-02-11
| | | | | | | | | | | DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201180 91177308-0d34-0410-b5e6-96231b3b80d8
* make llvm-dwarfdump a little more resilient when parsing .debug_locAdrian Prantl2014-02-11
| | | | | | | | sections. The call to data.getUnsigned(&Offset, AddressSize) only increments Offset if the read succeeds, which will result in an infinite loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201179 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Fix assertion on infinite loops.Matt Arsenault2014-02-11
| | | | | | | This isn't the most useful case to fix in the real world, but bugpoint runs into this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201177 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Teach icmp merging about the equivalence of bit tests and ↵Benjamin Kramer2014-02-11
| | | | | | | | | UGE/ULT with a power of 2. This happens in bitfield code. While there reorganize the existing code a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201176 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up a bit. Formatting only.Jim Grosbach2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201174 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Thumb2 LDR(literal) can target SP.Jim Grosbach2014-02-11
| | | | | | | | | Fix a slightly overzealous destination register restriction for the 'without .w' alias. Add some explicit testcases. rdar://16033140 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201173 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEV: Cast switched values to make -Wswitch more useful.Benjamin Kramer2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201170 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the declaration when LDPO_PIE is not available.Sylvestre Ledru2014-02-11
| | | | | | | | Thanks to İsmail Dönmez for the better declaration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201163 91177308-0d34-0410-b5e6-96231b3b80d8
* If LDPO_PIE is not defined (before binutils 2.23 version), Sylvestre Ledru2014-02-11
| | | | | | | | | use the hardcoded declaration 3 See r201110 for the initial change git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201161 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a note about using "Differential Revision:" in commit messagesMark Seaborn2014-02-11
| | | | | | | | | | I noticed this convention from the commit logs. It seems like it would be useful to document it, to encourage other committers to link back to code reviews in their commits. Differential Revision: http://llvm-reviews.chandlerc.com/D2678 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201160 91177308-0d34-0410-b5e6-96231b3b80d8
* ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.Benjamin Kramer2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201159 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the DAGCombiner how to fold concat_vector nodes when the input is twoRobert Lougher2014-02-11
| | | | | | | | | | | | | | | BUILD_VECTOR nodes, e.g.: (concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4)) -> (BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4) This fixes an issue with AVX, where a sequence was not recognized as a 256-bit vbroadcast due to the concat_vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201158 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELFBradley Smith2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201149 91177308-0d34-0410-b5e6-96231b3b80d8
* [LPM] Switch LICM to actively use LCSSA in addition to preserving it.Chandler Carruth2014-02-11
| | | | | | | | | | | | | | | | | | | | | | | Fixes PR18753 and PR18782. This is necessary for LICM to preserve LCSSA correctly and efficiently. There is still some active discussion about whether we should be using LCSSA, but we can't just immediately stop using it and we *need* LICM to preserve it while we are using it. We can restore the old SSAUpdater driven code if and when there is a serious effort to remove the reliance on LCSSA from all of the loop passes. However, this also serves as a great example of why LCSSA is very nice to have. This change significantly simplifies the process of sinking instructions for LICM, and makes it quite a bit less expensive. It wouldn't even be as complex as it is except that I had to start the process of removing the big recursive LCSSA formation hammer in order to switch even this much of the re-forming code to asserting that LCSSA was preserved. I'll fully remove that next just to tidy things up until the LCSSA debate settles one way or the other. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201148 91177308-0d34-0410-b5e6-96231b3b80d8
* XCore target: fix const section handlingRobert Lytton2014-02-11
| | | | | | | | | | | | Xcore target ABI requires const data that is externally visible to be handled differently if it has C-language linkage rather than C++ language linkage. Clang now emits ".cp.rodata" section information. All other externally visible constant data will be placed in the DP section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201144 91177308-0d34-0410-b5e6-96231b3b80d8
* XCore target: Lower ATOMIC_LOAD & ATOMIC_STORERobert Lytton2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201143 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX: fixed a bug in LowerVECTOR_SHUFFLEElena Demikhovsky2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201140 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and itsDmitri Gribenko2014-02-11
| | | | | | | only current user should be using toEpochTime() instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201136 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Optimized BUILD_VECTOR pattern; Elena Demikhovsky2014-02-11
| | | | | | | fixed encoding of VEXTRACTPS instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201134 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGenPrepare] Test case for the promotions that bypass theQuentin Colombet2014-02-11
| | | | | | | | | | profitability check due to some other checks in the addressing mode matcher. I.e., test case for commit r201121. <rdar://problem/16020230> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201132 91177308-0d34-0410-b5e6-96231b3b80d8
* In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) aLang Hames2014-02-11
| | | | | | | | | | | | | | | uintptr_t. An unsigned could overflow for large sections. No test case - anything big enough to overflow an unsigned is going to take an appreciable time to zero when the test passes. The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but these should probably be hardcoded to uint64_ts: It is legitimate to JIT for 64-bit targets from a 32-bit host/compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201127 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed attributes of all gather intrinsics from IntrReadMem to ↵Craig Topper2014-02-11
| | | | | | IntrReadArgMem as they access only memory based on argument. Patch by Robert Khasanov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201126 91177308-0d34-0410-b5e6-96231b3b80d8
* Using the helper API for random number generation.Aaron Ballman2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201125 91177308-0d34-0410-b5e6-96231b3b80d8
* Hopefully fixing the MinGW 32 build, which was broken by r200767. Not using ↵Aaron Ballman2014-02-11
| | | | | | rand_s() since MinGW does not have an implementation for it, but instead using the underlying CryptGenRandom APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201124 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGenPrepare] Undo changes that happened for the profitability check.Quentin Colombet2014-02-11
| | | | | | | | | | | | | | | | | | The addressing mode matcher checks at some point the profitability of folding an instruction into the addressing mode. When the instruction to be folded has several uses, it checks that the instruction can be folded in each use. To do so, it creates a new matcher for each use and check if the instruction is in the list of the matched instructions of this new matcher. The new matchers may promote some instructions and this has to be undone to keep the state of the original matcher consistent. A test case will follow. <rdar://problem/16020230> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201121 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Use existing symbol rather than creating it again.David Blaikie2014-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201119 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the *PassPrinter into their own module.Eli Bendersky2014-02-10
| | | | | | | | | | | | These are self-contained in functionality so it makes sense to separate them, as opt.cpp has grown quite big already. Following Eric's suggestions, if this code is ever deemed useful outside of tools/opt, it will make sense to move it to one of the LLVM libraries like IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201116 91177308-0d34-0410-b5e6-96231b3b80d8
* [Stackmaps] Cleanup code. No functional change intended.Juergen Ributzka2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201115 91177308-0d34-0410-b5e6-96231b3b80d8