Commit Graph

1398 Commits

Author SHA1 Message Date
Chris Lattner
c1819188b6 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:48:46 +00:00
Chris Lattner
6aaca046d2 ensure header is self contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:25:45 +00:00
Chris Lattner
a805874422 reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
one dependency on flex and gets rid of two ".cvs" files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 02:57:27 +00:00
Duncan Sands
87b665d3de Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values.  This seems a neater solution.
It is safe since no legal value type has size 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44107 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 08:29:13 +00:00
Dale Johannesen
b97aec663b Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13 19:13:01 +00:00
Bill Wendling
553d22c29e Move SYSCTL stuff close to where it's used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 23:55:19 +00:00
Devang Patel
5250f1f4b0 Build universal llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44030 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 23:53:43 +00:00
Owen Anderson
20ab29068d Add a flag for indirect branch instructions.
Target maintainers: please check that the instructions for your target are correctly marked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 07:39:39 +00:00
Owen Anderson
e7e113361e Fix on 64-bit machines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 00:56:04 +00:00
Anton Korobeynikov
f191c80cd7 Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 19:50:10 +00:00
Anton Korobeynikov
af1b61debd Add convenient helper to obtain list of ints
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 11:19:37 +00:00
Dale Johannesen
e3ef744d3e Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10 22:07:15 +00:00
Evan Cheng
2ba49a942e Added -test-opts to specify test options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-10 01:33:27 +00:00
Bill Wendling
6902e84ba0 Initial commit of files that support building LLVM the "Apple" way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09 06:59:33 +00:00
Dale Johannesen
483ec21d90 Interchange Dwarf numbers of ESP and EBP on x86 Darwin.
Much improvement in exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43794 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07 00:25:05 +00:00
Neil Booth
e3d936ac9c Remove some unnecessary C-style statics.
Restore an assertion that arithmetic can be performed on this format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02 15:10:05 +00:00
Chris Lattner
44f1476048 switch some calls to SelectionDAG::getTargetNode to use
the one that takes an operand list instead of explicit
operands.  There is one left though, the more interesting
one :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 06:25:09 +00:00
Anton Korobeynikov
a98c7b3b24 Update this file for 2.0 syntax. Contributed by Jan Rehders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-19 16:54:13 +00:00
Chris Lattner
6c1ba31d6f tblgen uses dynamic_cast heavily, so it needs rtti info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43126 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-18 15:54:45 +00:00
Gordon Henriksen
774577c1f9 Reverting unnecessary commit of generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:36:08 +00:00
Gordon Henriksen
4b2b9402c5 Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:28:48 +00:00
Hartmut Kaiser
efd4a5144b Updated VC++ build system.
Silenced some VC warnings.

I'm getting linker errors, though: unresolved externals:

llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

and

llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

Where are these defined?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 14:56:40 +00:00
Chris Lattner
01d029b82c One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
take a deleted nodes vector, instead of requiring it.

One more significant change:  Implement the start of a legalizer that
just works on types.  This legalizer is designed to run before the 
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.

This design/impl has the following advantages:

1. When finished, this will *significantly* reduce the amount of code in
   LegalizeDAG.cpp.  It will remove all the code related to promotion and
   expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike 
   LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
   for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of 
   deallocating and reallocating the entire graph that points to some 
   mutated node.
5. The code nicely separates out handling of operations with invalid 
   results from operations with invalid operands, making some cases
   simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :), 
   allowing you to easily understand what legalize types is doing.

This is not yet done.  Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing.  However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine.  The
biggest issues are:

1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.

Hey, at least it is a step in the right direction :).  If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it.  If
this explodes it will tell you what needs to be implemented.  Help is 
certainly appreciated.

Once this goes in, we can do three things:

1. Add a new pass of dag combine between the "type legalizer" and "operation
   legalizer" passes.  This will let us catch some long-standing isel issues
   that we miss because operation legalization often obfuscates the dag with
   target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
   making it much smaller and simpler.  When that happens we can then 
   reimplement the core functionality left in it in a much more efficient and
   non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
   selectiondags maybe...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-15 06:10:22 +00:00
Evan Cheng
3393f892c7 Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-12 08:39:02 +00:00
Tanya Lattner
9949c2a7ef If the user did not check out LLVM and request it to be built, it should be a build error. This relies on the user having a successful build of LLVM, but the tests will fail if they dont.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42514 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-02 00:19:27 +00:00
Dale Johannesen
317096ab37 Add sqrt and powi intrinsics for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:08:20 +00:00
Evan Cheng
d23aa5a053 Rename keyword "modify" -> "implicit".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 01:48:59 +00:00
Evan Cheng
a3ca3149f2 Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:35:01 +00:00
Evan Cheng
30729b48d4 Bug fix and minor clean up of generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 22:26:41 +00:00
Chris Lattner
10814820f6 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 17:40:48 +00:00
Dan Gohman
cb648f90a2 Remove spurious consts. This fixes warnings with compilers that
are strict about such things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:08:19 +00:00
Evan Cheng
85dbe1a1d2 Initial support for multi-result patterns:
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
 (modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:30:14 +00:00
Evan Cheng
aeb7d4d760 Allow set operators with multiple destinations, i.e. (set x, y, (op a, b)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41861 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 19:52:18 +00:00
Chris Lattner
111e8ce3a2 update this to use llvm-config, patch by Jose M. Moya
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:09:54 +00:00
Evan Cheng
ef61ed3507 TableGen no longer emit CopyFromReg nodes for implicit results in physical
registers. The scheduler is now responsible for emitting them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41781 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 23:59:02 +00:00
Evan Cheng
425e8c7eae Always check the type of node. This prevents situations such as selecting 32-bit rotate target instruction for a 64-bit node when 64-bit pattern is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41710 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:18:28 +00:00
Dan Gohman
0fee3ff93e Add MVT::fAny for overloading intrinsics on floating-point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-16 21:57:19 +00:00
Reid Spencer
f6101ac7bc Make use of the llvm-ld tool's new ability to read input from stdin to extract
the list of link time passes to be run, just as for opt, with the
-debug-pass=Arguments option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-13 06:19:51 +00:00
Reid Spencer
3c5b57c884 Now that llvm-ld can accept - as input from stdin, use this feature to extract
the pass arguments that it supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41019 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-11 16:11:22 +00:00
Rafael Espindola
594d37e21a propagate struct size and alignment of byval arguments to the DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-10 14:44:42 +00:00
Chandler Carruth
a583990ec8 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:57:16 +00:00
Chandler Carruth
6994040a95 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 01:51:18 +00:00
Evan Cheng
b5910820ce Added TargetInstrDescriptor::numDefs - num of results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40709 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 00:20:17 +00:00
Dan Gohman
f452207d20 More explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40589 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 14:51:59 +00:00
Chuck Rose III
936baaa5ae VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.
This commit fixes two things.  One is a pair of VStudio compiler errors stemming from variables
which defined within the for loop statement and also within the body of the for loop.  I fixed these 
by renaming one of the two variables.  Additionally, I've made the Function*->ExFunc map in 
ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown.  In repeated
uses of the interpreter, where the same Function* address may get used for completely differnet functions,
this was causing a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-27 18:26:35 +00:00
Dan Gohman
face9e56a1 Fix a pasto in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 15:11:00 +00:00
Christopher Lamb
1367fd09cb Have register info provide the inverse mapping of register->superregisters. PR1350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 08:01:58 +00:00
Christopher Lamb
08d52071ba Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 07:48:21 +00:00
Christopher Lamb
8245510ae0 Teach TableGen about the new vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 06:41:18 +00:00
Dan Gohman
a6a1ab3d28 A minor simplication in the generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 22:58:00 +00:00