Commit Graph

10528 Commits

Author SHA1 Message Date
Devang Patel
427ef4e35f Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 22:39:08 +00:00
Eric Christopher
88b5aca20a Add ability to set code model within the execution engine builders
and creation interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 21:58:16 +00:00
Evan Cheng
2a085c3493 Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 19:19:59 +00:00
Viktor Kutuzov
51cdac02c4 Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 18:48:27 +00:00
Nuno Lopes
2cd8abbf86 add Case() with 5 args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 15:35:39 +00:00
Duncan Sands
4a20c7a0a9 1. Allow SCCIterator to work with GraphT types that are constant.
2.  Allow SCCIterator to work with inverse graphs.
3.  Fix an incorrect comment in GraphTraits.h (the type in the comment 
was given as GraphType* when it is actually const GraphType &).
Patch by Patrick Alexander Simmons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 10:54:25 +00:00
Duncan Sands
8dc071a6e5 Following a suggestion of Daniel Dunbar, stop people passing the name
as the isSigned bool to CreateIntCast by having this resolve to a call
to a private method, rather than by using a gcc attribute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 08:34:52 +00:00
Lang Hames
ff1b61f2d3 Fixed call to wrong constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 07:19:50 +00:00
Jeffrey Yasskin
dc1472b6d9 In GlobalVariable::setInitializer, assert that the initializer has the
right type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 00:43:13 +00:00
Eric Christopher
4c269e2feb Fix unused variables warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 22:34:32 +00:00
Dan Gohman
21b8bddea5 Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 20:45:50 +00:00
Dan Gohman
81344503bc Remove an unnecessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 20:41:12 +00:00
Dan Gohman
6ac0e76ff4 Sink a #include <map> to where it's actually needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 20:40:47 +00:00
Dan Gohman
aec15e8456 Make PseudoSourceValue's classof recognize
FixedStackPseudoSourceValueVal, to respect this isa relationship.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 20:40:06 +00:00
Rafael Espindola
420d23c3d6 Add configure options for specifying where to look for libstdc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 19:46:55 +00:00
Douglas Gregor
1546b11140 Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 16:56:48 +00:00
Duncan Sands
4007324b58 Make sure that if anyone passes a name by accident for the isSigned
parameter of CreateIntCast then they get an error from the compiler
(or from the linker with a non-gcc compiler).  Another possibility
is to flip the order of the DestTy and isSigned parameters, since you
should then get a compiler warning if you try to use a char* for a
Type*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16 15:28:17 +00:00
Chris Lattner
ac57410a56 disable copying, enforce some invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 20:03:53 +00:00
Chris Lattner
5415127330 mark getIntrinsicID() 'readonly'. This allows various classof methods
(like DbgDeclareInst's) to shrink substantially.  It sucks that we have
to pull Compiler.h into such a public header, but at least Compiler.h
doesn't pull anything else in.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 19:56:28 +00:00
Chris Lattner
6f0c67d4ff add attributes for readnone/readonly functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 19:54:31 +00:00
Chris Lattner
9806f833a6 add a version of array_pod_sort that takes a custom comparator function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 19:52:43 +00:00
Edward O'Callaghan
e0fb75d586 Add PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 10:18:17 +00:00
Jim Grosbach
68bb60f6a4 Add function to replace a destination MBB in a single jump table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 20:09:13 +00:00
Benjamin Kramer
1b226abcd9 Remove dead variable found by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88803 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 19:51:20 +00:00
Benjamin Kramer
f2a39bd24f Implement DISABLE_INLINE for MSVC. This required changing the position in all
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 16:37:18 +00:00
Benjamin Kramer
7b068610eb Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
decl so move it there. GCC accepts it both in front and after decls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 14:14:58 +00:00
Daniel Dunbar
067d024b05 Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
- This is an initial step towards -march=native support in Clang, and towards
   eliminating host dependencies in the targets. See PR5389.

 - Patch by Roman Divacky!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 10:09:12 +00:00
Evan Cheng
fae3e92345 Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 03:42:17 +00:00
Evan Cheng
d57cdd5683 - Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
- If destination is a physical register and it has a subreg index, use the
  sub-register instead.
This fixes PR5423.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 02:55:43 +00:00
Dan Gohman
4ec01b268e Add an option for running GVN with redundant load processing disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 02:27:51 +00:00
Lang Hames
b3661585c0 Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.
PreAllocSplitting is now using this API to insert code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 00:02:51 +00:00
Dan Gohman
ce8447ccfe Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 22:24:13 +00:00
Jakob Stoklund Olesen
ce727d0da0 Add MachineFunction::verify() to call the machine code verifier directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:56:09 +00:00
Dan Gohman
24f8e29b4e Use .data() instead of .c_str() when nul-termination is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:55:31 +00:00
Devang Patel
a2b3cdc21f Do not use value handle to wrap MDNode in DIDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:45:04 +00:00
David Goodwin
87d21b92fc Allow target to specify regclass for which antideps will only be broken along the critical path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:52:48 +00:00
David Greene
0d1680a7d8 Remove duplicate APIs and state WRT spill objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 14:42:06 +00:00
Devang Patel
3ddf70442f Revert r87059 for now. It is failing clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 02:27:33 +00:00
Rafael Espindola
c78c0c99a0 Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 02:18:25 +00:00
Dale Johannesen
1e608819aa Adjust isConstantSplat to allow for big-endian targets.
PPC is such a target; make it work.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 01:45:18 +00:00
Victor Hernandez
0418c102dd Remove unnecessary llvm.dbg.declare bitcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 01:44:55 +00:00
Rafael Espindola
5ccac24726 Add a new split method to StringRef that puts the substrings in a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 01:24:40 +00:00
David Greene
dda3978d78 Fix a bootstrap failure.
Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE
interfaces to explicitly request checking for post-frame ptr elimination
operands.  This uses a heuristic so it isn't reliable for correctness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 00:29:53 +00:00
David Greene
b3bc115a24 Do some cleanups suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:49:55 +00:00
Daniel Dunbar
89fccca4b0 StringRef(const char*) should not be used to turn null pointers into empty
strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:26:11 +00:00
Daniel Dunbar
efae4d379d Remove my Value.h build fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:07:02 +00:00
David Greene
d7a18e420e Fix a build error by providing a missing enum value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:04:19 +00:00
David Greene
b9c2fd964e Make the MachineFunction argument of getFrameRegister const.
This also fixes a build error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 21:00:03 +00:00
David Greene
b87bc95db0 Add hasLoadFromStackSlot and hasStoreToStackSlot to return whether a
machine instruction loads or stores from/to a stack slot.  Unlike
isLoadFromStackSlot and isStoreFromStackSlot, the instruction may be
something other than a pure load/store (e.g. it may be an arithmetic
operation with a memory operand).  This helps AsmPrinter determine when
to print a spill/reload comment.

This is only a hint since we may not be able to figure this out in all
cases.  As such, it should not be relied upon for correctness.

Implement for X86.  Return false by default for other architectures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:55:29 +00:00
Daniel Dunbar
db99095cfe Attempt to unbreak LLVM build, David G. please check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:53:56 +00:00