summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
...
* Fix a typo in VariadicFunction.h that leads to invalid code in macro expansion.Chad Rosier2012-08-15
| | | | | | Patch by Andy Gibbs <andyg1001@hotmail.co.uk> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161973 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the branch probability of branching to the 'normal' destination of an invokeBill Wendling2012-08-15
| | | | | | | | | | | instruction to something absurdly high, while setting the probability of branching to the 'unwind' destination to the bare minimum. This should set cause the normal destination's invoke blocks to be moved closer to the invoke. PR13612 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161944 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Fix incorrect use of signed values.Michael J. Spencer2012-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161900 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the fixed-length disassembler to be table-driven.Jim Grosbach2012-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the TableGen'erated fixed length disassemblmer to use a table-driven state machine rather than a massive set of nested switch() statements. As a result, the ARM Disassembler (ARMDisassembler.cpp) builds much more quickly and generates a smaller end result. For a Release+Asserts build on a 16GB 3.4GHz i7 iMac w/ SSD: Time to compile at -O2 (averaged w/ hot caches): Previous: 35.5s New: 8.9s TEXT size: Previous: 447,251 New: 297,661 Builds in 25% of the time previously required and generates code 66% of the size. Execution time of the disassembler is only slightly slower (7% disassembling 10 million ARM instructions, 19.6s vs 21.0s). The new implementation has not yet been tuned, however, so the performance should almost certainly be recoverable should it become a concern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161888 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid undefined behavior in DenseMap::shrink_and_clear(). Log2_32_Ceil(0)Richard Smith2012-08-14
| | | | | | | | returns 32. This change mirrors the corresponding code in SmallDenseMap::shrink_and_clear(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161829 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a roundToIntegral method to APFloat, which can be parameterized over ↵Owen Anderson2012-08-13
| | | | | | various rounding modes. Use this to implement SelectionDAG constant folding of FFLOOR, FCEIL, and FTRUNC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161807 91177308-0d34-0410-b5e6-96231b3b80d8
* LICM uses AliasSet information to hoist and sink instructions. However, ↵Nadav Rotem2012-08-13
| | | | | | | | | | | | | | other passes, such as LoopRotate may invalidate its AliasSet because SSAUpdater does not update the AliasSet properly. This patch teaches SSAUpdater to notify AliasSet that it made changes. The testcase in PR12901 is too big to be useful and I could not reduce it to a normal size. rdar://11872059 PR12901 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161803 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the TII::scheduleTwoAddrSource() hook.Jakob Stoklund Olesen2012-08-13
| | | | | | | | | | | | | | | It never does anything when running 'make check', and it get's in the way of updating live intervals in 2-addr. The hook was originally added to help form IT blocks in Thumb2 code before register allocation, but the pass ordering has changed since then, and we run if-conversion after register allocation now. When the MI scheduler is enabled, there will be no less than two schedulers between 2-addr and Thumb2ITBlockPass, so this hook is unlikely to help anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161794 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a documentation typo.Nadav Rotem2012-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161758 91177308-0d34-0410-b5e6-96231b3b80d8
* Create isXBitVector methods in MVT and call them from EVT. This allows ↵Craig Topper2012-08-11
| | | | | | targets to call them with an MVT without needing to convert to EVT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161731 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of addition comment fixesEli Bendersky2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of typos in commentsEli Bendersky2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161677 91177308-0d34-0410-b5e6-96231b3b80d8
* Move BasicBlockEdge to the cpp file. No functionality change.Rafael Espindola2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161663 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some missing includes for the build against stdcxx.Joerg Sonnenberger2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161657 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2012-08-10
| | | | | | switched from a bytecode+bzip2 to the current bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r161633-161634 "Partition use lists so defs always come before uses.""Jakob Stoklund Olesen2012-08-10
| | | | | | | No changes to these patches, MRI needed to be notified when changing uses into defs and vice versa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161644 91177308-0d34-0410-b5e6-96231b3b80d8
* Also update MRI use lists when changing a use to a def and vice versa.Jakob Stoklund Olesen2012-08-10
| | | | | | This was the cause of the buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161643 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Add a new Inline Asm Non-Standard Dialect attribute.Chad Rosier2012-08-10
| | | | | | | | | | | | | | This new attribute is intended to be used by the backend to determine how the inline asm string should be parsed/printed. This patch adds the ia_nsdialect attribute and also adds a test case to ensure the IR is correctly parsed, but there is no functional change at this time. The standard dialect is assumed to be AT&T. Therefore, this attribute should only be added to MS-style inline assembly statements, which use the Intel dialect. If we ever support more dialects we'll need to add additional state to the attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161641 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r161633-161634 "Partition use lists so defs always come before uses."Jakob Stoklund Olesen2012-08-09
| | | | | | These commits broke a number of buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161640 91177308-0d34-0410-b5e6-96231b3b80d8
* Partition use lists so defs always come before uses.Jakob Stoklund Olesen2012-08-09
| | | | | | | | | | | | | | | | This makes it possible to speed up def_iterator by stopping at the first use. This makes def_empty() and getUniqueVRegDef() much faster when there are many uses. In a +Asserts build, LiveVariables is 100x faster in one case because getVRegDef() has an assertion that would scan to the end of a def_iterator chain. Spill weight calculation is significantly faster (300x in one case) because isTriviallyReMaterializable() calls MRI->isConstantPhysReg(%RIP) which calls def_empty(%RIP). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161634 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use pointer-pointers for the register use lists.Jakob Stoklund Olesen2012-08-09
| | | | | | | | | | | Use a more conventional doubly linked list where the Prev pointers form a cycle. This means it is no longer necessary to adjust the Prev pointers when reallocating the VRegInfo array. The test changes are required because the register allocation hint is using the use-list order to break ties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161633 91177308-0d34-0410-b5e6-96231b3b80d8
* Move use list management into MachineRegisterInfo.Jakob Stoklund Olesen2012-08-09
| | | | | | | | | | | | | | Register MachineOperands are kept in linked lists accessible via MRI's reg_iterator interfaces. The linked list management was handled partly by MachineOperand methods, partly by MRI methods. Move all of the list management into MRI, delete MO::AddRegOperandToRegInfo() and MO::RemoveRegOperandFromRegInfo(). Be more explicit about handling the cases where an MRI pointer isn't available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161632 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).Chad Rosier2012-08-09
| | | | | | | | | | This new API will be used by clang to parse ms-style inline asms. One goal of this project is to use this style of inline asm for targets other then x86. Therefore, this API needs to be implemented for non-x86 targets at some point in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161624 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineRegisterInfo was already a friend of MachineOperand, and GCC complainsMatt Beaumont-Gay2012-08-09
| | | | | | about repeated friending. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161553 91177308-0d34-0410-b5e6-96231b3b80d8
* Move [SU]LEB128 encoding to a utility header.Jim Grosbach2012-08-08
| | | | | | | These functions are very generic. There's no reason for them to be tied to MCObjectWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161545 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getNextOperandForReg() into MachineRegisterInfo.Jakob Stoklund Olesen2012-08-08
| | | | | | | MRI provides iterators for traversing the use-def chains. They should not be accessible from anywhere else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161543 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow legalization of target-specific SDNodes, provided that the target ↵Owen Anderson2012-08-08
| | | | | | itself provide a legalization hook for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161536 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove OpenBSD defines:Bill Wendling2012-08-08
| | | | | | | | | | - The defines are in stddint.h, which is #include'd already. - The block wasn't used anyway, since it was _OpenBSD_, and not __OpenBSD__ Patch by David Hill! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161515 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MispredictPenalty to SchedMachineModel.Andrew Trick2012-08-08
| | | | | | | This replaces an existing subtarget hook on ARM and allows standard CodeGen passes to potentially use the property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161471 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup of defaultDefLatency APIAndrew Trick2012-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161470 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix a quadratic algorithm in MachineBranchProbabilityInfo."Jakob Stoklund Olesen2012-08-08
| | | | | | It caused an assertion failure when compiling consumer-typeset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161463 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a quadratic algorithm in MachineBranchProbabilityInfo.Jakob Stoklund Olesen2012-08-08
| | | | | | | | The getSumForBlock function was quadratic in the number of successors because getSuccWeight would perform a linear search for an already known iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161460 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SelectionDAG::getTargetIndex.Jakob Stoklund Olesen2012-08-07
| | | | | | | This adds support for TargetIndex operands during isel. The meaning of these (index, offset, flags) operands is entirely defined by the target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161453 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new kind of MachineOperand: MO_TargetIndex.Jakob Stoklund Olesen2012-08-07
| | | | | | | | | | | | A target index operand looks a lot like a constant pool reference, but it is completely target-defined. It contains the 8-bit TargetFlags, a 32-bit index, and a 64-bit offset. It is preserved by all code generator passes. TargetIndex operands can be used to carry target-specific information in cases where immediate operands won't suffice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161441 91177308-0d34-0410-b5e6-96231b3b80d8
* The dominance computation already has logic for computing if an edge dominatesRafael Espindola2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | a use or a BB, but it is inline in the handling of the invoke instruction. This patch refactors it so that it can be used in other cases. For example, in define i32 @f(i32 %x) { bb0: %cmp = icmp eq i32 %x, 0 br i1 %cmp, label %bb2, label %bb1 bb1: br label %bb2 bb2: %cond = phi i32 [ %x, %bb0 ], [ 0, %bb1 ] %foo = add i32 %cond, %x ret i32 %foo } GVN should be able to replace %x with 0 in any use that is dominated by the true edge out of bb0. In the above example the only such use is the one in the phi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161429 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r161371. Removing the 'const' before Type is a "good thing".Bill Wendling2012-08-07
| | | | | | | | | | --- Reverse-merging r161371 into '.': U include/llvm/Target/TargetData.h U lib/Target/TargetData.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161394 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify the Type parameter to some methods (which are const anyway).Bill Wendling2012-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161371 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Jakob Stoklund Olesen2012-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161354 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the OpenBSD for Bitrig.Eric Christopher2012-08-06
| | | | | | Patch by David Hill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161344 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MIPS DSP Rev1 intrinsics memory properties.Simon Atanasyan2012-08-06
| | | | | | | The patch reviewed by Akira Hatanaka. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161332 91177308-0d34-0410-b5e6-96231b3b80d8
* Put up warning signs around MO::getNextOperandForReg().Jakob Stoklund Olesen2012-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161329 91177308-0d34-0410-b5e6-96231b3b80d8
* Add readcyclecounter lowering on PPC64.Hal Finkel2012-08-04
| | | | | | | | On PPC64, this can be done with a simple TableGen pattern. To enable this, I've added the (otherwise missing) readcyclecounter SDNode definition to TargetSelectionDAG.td. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161302 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an experimental -early-live-intervals option.Jakob Stoklund Olesen2012-08-03
| | | | | | | | | | This option runs LiveIntervals before TwoAddressInstructionPass which will eventually learn to exploit and update the analysis. Eventually, LiveIntervals will run before PHIElimination, and we can get rid of LiveVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161270 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to reduce the compile time impact of r161232.Bob Wilson2012-08-03
| | | | | | | | | | | | The previous change caused fast isel to not attempt handling any calls to builtin functions. That included things like "printf" and caused some noticable regressions in compile time. I wanted to avoid having fast isel keep a separate list of functions that had to be kept in sync with what the code in SelectionDAGBuilder.cpp was handling. I've resolved that here by moving the list into TargetLibraryInfo. This is somewhat redundant in SelectionDAGBuilder but it will ensure that we keep things consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161263 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely eliminate VNInfo flags.Jakob Stoklund Olesen2012-08-03
| | | | | | | | The 'unused' state of a value number can be represented as an invalid def SlotIndex. This also exposed code that shouldn't have been looking at unused value VNInfos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161258 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the VNInfo::hasPHIKill() flag.Jakob Stoklund Olesen2012-08-03
| | | | | | | | | | The only real user of the flag was removeCopyByCommutingDef(), and it has been switched to LiveIntervals::hasPHIKill(). All the code changed by this patch was only concerned with computing and propagating the flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161255 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the hasPHIKills flag a computed property.Jakob Stoklund Olesen2012-08-03
| | | | | | | | | | | | | The VNInfo::HAS_PHI_KILL is only half supported. We precompute it in LiveIntervalAnalysis, but it isn't properly updated by live range splitting and functions like shrinkToUses(). It is only used in one place: RegisterCoalescer::removeCopyByCommutingDef(). This patch changes that function to use a new LiveIntervals::hasPHIKill() function that computes the flag for a given value number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161254 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for detecting libxml for Dmitri's work. He'llEric Christopher2012-08-03
| | | | | | commit code in clang that uses this shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161252 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a dead prototype.Jakob Stoklund Olesen2012-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161250 91177308-0d34-0410-b5e6-96231b3b80d8
* Fall back to selection DAG isel for calls to builtin functions.Bob Wilson2012-08-03
| | | | | | | | | | Fast isel doesn't currently have support for translating builtin function calls to target instructions. For embedded environments where the library functions are not available, this is a matter of correctness and not just optimization. Most of this patch is just arranging to make the TargetLibraryInfo available in fast isel. <rdar://problem/12008746> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161232 91177308-0d34-0410-b5e6-96231b3b80d8