summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a reference into the BlockLiveness DenseMap to avoid repeated hash ↵Craig Topper2013-02-191-6/+9
| | | | | | lookups in collectMarkers. llvm-svn: 175484
* Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.Benjamin Kramer2013-02-181-0/+8
| | | | llvm-svn: 175457
* [ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.Chad Rosier2013-02-181-2/+1
| | | | llvm-svn: 175456
* [ms-inline asm] Fix undefined behavior to reset hasMSInlineAsm in advance of ↵NAKAMURA Takumi2013-02-181-0/+1
| | | | | | SelectAllBasicBlocks(). llvm-svn: 175422
* Remove use of reverse iterators in repairIntervalsInRange(). While they wereCameron Zwarich2013-02-172-16/+13
| | | | | | | arguably better than forward iterators for this use case, they are confusing and there are some implementation problems with reverse iterators and MI bundles. llvm-svn: 175393
* Use ArrayRef instead of a reference to a SmallVectorImpl.Cameron Zwarich2013-02-171-1/+1
| | | | llvm-svn: 175385
* Fix a conversion from a forward iterator to a reverse iterator inCameron Zwarich2013-02-171-6/+7
| | | | | | | | | | | MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than an instr_iterator, the isBundled() check only passes if getFirstTerminator() returned end() and the garbage memory happens to lean that way. Multiple successors can be present without any terminator instructions in the case of exception handling with a fallthrough. llvm-svn: 175383
* Add support for updating the LiveIntervals of registers used by 'exotic'Cameron Zwarich2013-02-172-0/+65
| | | | | | | | | | | | terminators that actually have register uses when splitting critical edges. This commit also introduces a method repairIntervalsInRange() on LiveIntervals, which allows for repairing LiveIntervals in a small range after an arbitrary target hook modifies, inserts, and removes instructions. It's pretty limited right now, but I hope to extend it to support all of the things that are done by the convertToThreeAddress() target hooks. llvm-svn: 175382
* Replace erase loop with std::remove_if.Benjamin Kramer2013-02-161-6/+5
| | | | | | This avoids unnecessary copies. No functionality change. llvm-svn: 175367
* Replace loop with std::find.Benjamin Kramer2013-02-161-10/+4
| | | | | | No functionality change. llvm-svn: 175366
* LegalizeDAG.cpp doesn't need DenseMap.Jakub Staszak2013-02-161-1/+0
| | | | llvm-svn: 175365
* Use const reference instead of vector object when passing an argument toJakub Staszak2013-02-161-1/+1
| | | | | | updateScheduledPressure method. llvm-svn: 175362
* [ms-inline asm] Do not omit the frame pointer if we have ms-inline assembly.Chad Rosier2013-02-161-14/+17
| | | | | | | | | | | If the frame pointer is omitted, and any stack changes occur in the inline assembly, e.g.: "pusha", then any C local variable or C argument references will be incorrect. I pass no judgement on anyone who would do such a thing. ;) rdar://13218191 llvm-svn: 175334
* Use the 'target-features' and 'target-cpu' attributes to reset the subtarget ↵Bill Wendling2013-02-151-0/+4
| | | | | | | | | | features. If two functions require different features (e.g., `-mno-sse' vs. `-msse') then we want to honor that, especially during LTO. We can do that by resetting the subtarget's features depending upon the 'target-feature' attribute. llvm-svn: 175314
* enable SDISel sincos optimization for GNU environmentsPaul Redmond2013-02-152-9/+33
| | | | | | | | | | | | - add sincos to runtime library if target triple environment is GNU - added canCombineSinCosLibcall() which checks that sincos is in the RTL and if the environment is GNU then unsafe fpmath is enabled (required to preserve errno) - extended sincos-opt lit test Reviewed by: Hal Finkel llvm-svn: 175283
* Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C ↵Benjamin Kramer2013-02-151-1/+1
| | | | | | linkage. llvm-svn: 175264
* Dont merge consecutive loads/stores into vectors when noimplicitfloat is used.Nadav Rotem2013-02-141-6/+6
| | | | llvm-svn: 175190
* Add some legality checks for SETCC before introducing it in the DAG combiner ↵Owen Anderson2013-02-141-2/+6
| | | | | | post-operand legalization. llvm-svn: 175149
* RegisterCoalescer::reMaterializeTrivialDef() can constrain the destinationCameron Zwarich2013-02-141-1/+1
| | | | | | register class to match the defining instruction. llvm-svn: 175130
* Fix RegisterCoalescer::rematerializeTrivialDef() so that it works on flippedCameron Zwarich2013-02-141-10/+10
| | | | | | | CoalescerPairs. Also, make it take a CoalescerPair directly like other methods of RegisterCoalescer. llvm-svn: 175123
* Fix some issues with rematerialization in RegisterCoalescer when the destinationCameron Zwarich2013-02-141-0/+10
| | | | | | | | | | | | of the copy is a subregister def. The current code assumes that it can do a full def of the destination register, but it is not checking that the def operand is read-undef. It also doesn't clear the subregister index of the destination in the new instruction to reflect the full subregister def. These issues were found running 'make check' with my next commit that enables rematerialization in more cases. llvm-svn: 175122
* Clean up LDV, no functionality change.Manman Ren2013-02-132-64/+19
| | | | | | | | Remove dead functions: renameRegister Move private member variables from LDV to Impl Remove ssp/uwtable from testing case llvm-svn: 175072
* MIsched: HazardRecognizers are created for each DAG. Free them.Andrew Trick2013-02-131-1/+6
| | | | llvm-svn: 175067
* Fix comment.Eric Christopher2013-02-131-2/+2
| | | | llvm-svn: 175024
* Debug Info: LiveDebugVarible can remove DBG_VALUEs, make sure we emit them back.Manman Ren2013-02-133-14/+16
| | | | | | | | | | | | | | RegisterCoalescer used to depend on LiveDebugVariable. LDV removes DBG_VALUEs without emitting them at the end. We fix this by removing LDV from RegisterCoalescer. Also add an assertion to make sure we call emitDebugValues if DBG_VALUEs are removed at runOnMachineFunction. rdar://problem/13183203 Reviewed by Andy & Jakob llvm-svn: 175023
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-122-2/+2
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Allow optionally generating pubnames section in DWARF info. IntroduceKrzysztof Parzyszek2013-02-124-2/+83
| | | | | | option "generate-dwarf-pubnames" to control it, set to "false" by default. llvm-svn: 174981
* Equal treatment of labels and other terminators in MI DAG construction.Sergei Larin2013-02-121-1/+1
| | | | | | | MI sched DAG construction allows targets to include terminators into scheduling DAG. Extend this functionality to labels as well. llvm-svn: 174977
* PR14562 - Truncation of left shift became undefPaul Redmond2013-02-121-2/+9
| | | | | | | | | | | DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32)) into (shl i32 v, 32) into undef. To prevent this, check the shift count against the final result size. Patch by: Kevin Schoedel Reviewed by: Nadav Rotem llvm-svn: 174972
* Don't consider definitions by other PHIs live-in when trimming a PHI source'sCameron Zwarich2013-02-121-1/+5
| | | | | | live range after inserting a copy at the end of a block. llvm-svn: 174945
* Fix indentation.Cameron Zwarich2013-02-121-2/+2
| | | | llvm-svn: 174944
* Add a hidden option to PHIElimination to split all critical edges. This isCameron Zwarich2013-02-121-4/+9
| | | | | | | particularly useful for catching issues with architectures that have exotic terminators like MIPS. llvm-svn: 174938
* Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splittingCameron Zwarich2013-02-121-2/+6
| | | | | | a critical edge. llvm-svn: 174936
* Fix the updating of LiveIntervals after splitting a critical edge. PHI operandCameron Zwarich2013-02-121-12/+3
| | | | | | | live ranges should always be extended, and the only successor that should be considered for extension of other ranges is the target of the split edge. llvm-svn: 174935
* Check type for legality before forming a select from loads.Pete Cooper2013-02-121-1/+3
| | | | | | | | Sorry for the lack of a test case. I tried writing one for i386 as i know selects are illegal on this target, but they are actually considered legal by isel and expanded later. I can't see any targets to trigger this, but checking for the legality of a node before forming it is general goodness. llvm-svn: 174934
* Add support for updating LiveIntervals to ↵Cameron Zwarich2013-02-112-1/+69
| | | | | | | | | | | | | | | MachineBasicBlock::SplitCriticalEdge(). This is currently a bit hairier than it needs to be, since depending on where the split block resides the end ListEntry of the split block may be the end ListEntry of the original block or a new entry. Some changes to the SlotIndexes updating should make it possible to eliminate the two cases here. This also isn't as optimized as it could be. In the future Liveinterval should probably get a flag that indicates whether the LiveInterval is within a single basic block. We could ignore all such intervals when splitting an edge. llvm-svn: 174870
* Update SlotIndexes after updateTerminator() possibly removes instructions. I amCameron Zwarich2013-02-111-0/+24
| | | | | | really trying to avoid piping SlotIndexes through to RemoveBranch() and friends. llvm-svn: 174869
* Revert "Rename LLVMContext diagnostic handler types and functions."Bob Wilson2013-02-111-5/+5
| | | | | | | | | This reverts my commit 171047. Now that I've removed my misguided attempt to support backend warnings, these diagnostics are only about inline assembly. It would take quite a bit more work to generalize them properly, so I'm just reverting this. llvm-svn: 174860
* Currently, codegen may spent some time in SDISel passes even if an entireEvan Cheng2013-02-112-8/+40
| | | | | | | | | | | | | | function is successfully handled by fast-isel. That's because function arguments are *always* handled by SDISel. Introduce FastLowerArguments to allow each target to provide hook to handle formal argument lowering. As a proof-of-concept, add ARMFastIsel::FastLowerArguments to handle functions with 4 or fewer scalar integer (i8, i16, or i32) arguments. It completely eliminates the need for SDISel for trivial functions. rdar://13163905 llvm-svn: 174855
* Remove unnecessary code.Evan Cheng2013-02-111-4/+0
| | | | llvm-svn: 174854
* Fix the unused but nearly correct method SlotIndexes::insertMBBInMaps() and addCameron Zwarich2013-02-101-0/+14
| | | | | | | | support for updating SlotIndexes to MachineBasicBlock::SplitCriticalEdge(). This calls renumberIndexes() every time; it should be improved to only renumber locally. llvm-svn: 174851
* Abstract the liveness checking in PHIElimination::SplitPHIEdges() to supportCameron Zwarich2013-02-101-2/+37
| | | | | | both LiveVariables and LiveIntervals. llvm-svn: 174850
* Add support for updating LiveIntervals to PHIElimination. If LiveIntervals areCameron Zwarich2013-02-101-29/+142
| | | | | | | | | | | | | | | | | | | present, it currently verifies them with the MachineVerifier, and this passed all of the test cases in 'make check' (when accounting for existing verifier errors). There were some assertion failures in the two-address pass, but they also happened on code without phis and look like they are caused by different kill flags from LiveIntervals. The only part that doesn't work is the critical edge splitting heuristic, because there isn't currently an efficient way to update LiveIntervals after splitting an edge. I'll probably start by implementing the slow fallback and test that it works before tackling the fast path for single-block ranges. The existing code that updates LiveVariables is fairly slow as it is. There isn't a command-line option for enabling this; instead, just edit PHIElimination.cpp to require LiveIntervals. llvm-svn: 174831
* Fix a typo.Cameron Zwarich2013-02-101-1/+1
| | | | llvm-svn: 174830
* Remove ancient references to 'atomic' phis in PHIElimination that don't reallyCameron Zwarich2013-02-101-12/+8
| | | | | | make sense anymore. llvm-svn: 174829
* Make LiveVariables an instance variable of PHIElimination.Cameron Zwarich2013-02-101-11/+9
| | | | llvm-svn: 174828
* Remove unneeded "TargetMachine.h" #includes.Jakub Staszak2013-02-095-5/+0
| | | | llvm-svn: 174817
* Dwarf: do not use line_table_start in at_stmt_list since we do not always emit Manman Ren2013-02-091-1/+4
| | | | | | line table entries in assembly. llvm-svn: 174785
* Remove the old liveness algorithm.Jakob Stoklund Olesen2013-02-091-308/+5
| | | | | | This is part of the plan to delete LiveVariables. llvm-svn: 174783
* Turn on -new-live-intervals by default.Jakob Stoklund Olesen2013-02-081-3/+3
| | | | | | | | This uses a liveness algorithm that does not depend on data from the LiveVariables analysis, it is the first step towards removing LiveVariables completely. llvm-svn: 174774
OpenPOWER on IntegriCloud