Commit Graph

1366 Commits

Author SHA1 Message Date
Roman Levenstein 52a005ac13 Do not generate by TableGen the hard-coded standard, target-independent part of
DAG instruction selectors. Introudce a dedicated header file for this part:
include/llvm/CodeGen/DAGISelHeader.h

TableGen now only generates the include preprocessor directive to include this
new header.

This is a preparation for supporting multiple implementations of instruction
selectors in the future.

Reviewed and approved by Evan and Dan.

llvm-svn: 51102
2008-05-14 10:17:11 +00:00
Mikhail Glushenkov c79304461a Filter option names to escape symbols not allowed as C++ identifiers.
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.

llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov 22ce861ffe Reapply 50867: A small refactoring (extract method) + some comment fixes.
Fixed the build breakage, sorry for that.

llvm-svn: 50895
2008-05-09 08:27:26 +00:00
Tanya Lattner 93cea9fd18 Revertin 50867 since it was breaking the build.
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov d7e151f868 A small refactoring (extract method) + some comment fixes.
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov 41318a15d0 Use Doxygen-style comments.
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Mikhail Glushenkov eeac27e38c Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov 5e9d6a3dd8 Add new edge property combinator: weight.
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov a02084cff7 Use edge weights to choose the right linker based on input language names.
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov 1b056e9e5a Add weights to graph edges. Choose between edges based on their weight.
llvm-svn: 50757
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov 3a2f5c423e Remove the UnpackValues() function.
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov 7f6ed20009 Add a --linker command-line option, make all tests pass.
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov 20c18c344b Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov 1002d5f33f Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
llvm-svn: 50748
2008-05-06 18:09:29 +00:00
Mikhail Glushenkov d4918dd32c Add output redirection, rename namespace llvmcc to namespace llvmc.
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov 7ed45e2261 Small output formatting fix.
llvm-svn: 50739
2008-05-06 17:27:15 +00:00
Mikhail Glushenkov 2709e1a2c9 Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
llvm-svn: 50738
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov baa0b592d0 Return const char* instead of std::string in Tool classes
llvm-svn: 50733
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov 1c41c6d734 Refactoring: extract method.
llvm-svn: 50731
2008-05-06 17:23:14 +00:00
Mikhail Glushenkov 59eb254092 Add new edge properties: parameter_equals, element_in_list, and.
llvm-svn: 50730
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov 681df41f2c Implemented switch_on edge property.
llvm-svn: 50729
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov 251280ce0b More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
llvm-svn: 50726
2008-05-06 16:36:50 +00:00
Mikhail Glushenkov 459df48de7 Ongoing work: add an edge typechecker, rudimentary support for edge properties.
llvm-svn: 50725
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov adcb08d1b3 Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
llvm-svn: 50724
2008-05-06 16:35:25 +00:00
Mikhail Glushenkov a8276c5323 Code reorg
llvm-svn: 50722
2008-05-06 16:34:12 +00:00
Bill Wendling 557ecd8670 Remove tar ball from installed directory.
llvm-svn: 50717
2008-05-06 08:33:07 +00:00
Bill Wendling d8c2d29327 Added support for:
- defm and multiclass
- imbricatable multiline C style comment
- FIXME/TODO highlight in comment
- binary and hexadecimal number
- code using [{ }] is no highlighted as special (perhaps not the best
choice)
Patch by Cedric Venet!

llvm-svn: 50319
2008-04-27 09:44:10 +00:00
Bill Wendling 837b1dcf36 Apple GCC 4.2 builds things differently. It no longer spawns a bunch of
processes, but requires the project to use -j.

llvm-svn: 49744
2008-04-15 21:33:52 +00:00
Chuck Rose III c6a47e8a79 VisualStudio project files updated. #include <algorithm> added to make VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.
llvm-svn: 49743
2008-04-15 21:27:11 +00:00
Evan Cheng ba7126064a Sort sub-registers and super-registers lists according to super-sub register relations. e.g. X86::RAX sub-register list is EAX, AX, AL, AH (order of last two are not guaranteed).
llvm-svn: 49714
2008-04-15 07:56:03 +00:00
Bill Wendling 97632952c9 Install into the directory
llvm-svn: 49713
2008-04-15 07:02:59 +00:00
Devang Patel bde1bbed16 Change llvm tools install location.
llvm-svn: 49540
2008-04-11 17:45:39 +00:00
Chris Lattner 57dd77462b produce an error on invalid input instead of asserting:
def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
           ^

llvm-svn: 49462
2008-04-10 04:48:34 +00:00
Nate Begeman a6063118c6 Fix a bug where an incorrect bit mask would be generated if a target's last asm
string began at a power of 2 in the string index.  For example, if "ret" started
at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31.

llvm-svn: 49433
2008-04-09 16:24:11 +00:00
Chris Lattner 5ed17b67d2 Fix generation of multi-stage instruction itineraries. Patch by
giuma.cordes@gmail.com

llvm-svn: 49276
2008-04-06 17:38:14 +00:00
Dan Gohman fc4ad7de66 Move instruction flag inference out of InstrInfoEmitter and into
CodeGenDAGPatterns, where it can be used in other tablegen backends.
This allows the inference to be done for DAGISelEmitter so that it
gets accurate mayLoad/mayStore/isSimpleLoad flags. 

This brings MemOperand functionality back to where it was before
48329. However, it doesn't solve the problem of anonymous patterns
which expand to code that does loads or stores.

llvm-svn: 49123
2008-04-03 00:02:49 +00:00
Anton Korobeynikov 20c9e4cbee Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
when some another register is used for argument passing.
Currently is used on Win64.

llvm-svn: 49079
2008-04-02 05:23:57 +00:00
Chris Lattner 6f2ffdb73f Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.

llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Bill Wendling a86fd1b214 Simplify the conversion from "0x" numbers to a single digit number.
llvm-svn: 48907
2008-03-28 06:22:23 +00:00
Mikhail Glushenkov abb139c3f8 Fix build breakage on Windows with GCC 4.3. References bug #2176.
llvm-svn: 48874
2008-03-27 09:53:47 +00:00
Dan Gohman c60c67fc37 Add explicit keywords.
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman bdc24adaaf A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.

llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Anton Korobeynikov 70548d835e Add first proof-of-concept universal compiler driver framework based
on ideas mentioned in PR686.
Written by Mikhail Glushenkov and contributed by Codedgers, Inc.

Old llvmc will be removed soon after new one will have all its properties.

llvm-svn: 48699
2008-03-23 08:57:20 +00:00
Bill Wendling da2586f69a Don't strip things when we're doing a debug build.
llvm-svn: 48696
2008-03-22 21:57:15 +00:00
Duncan Sands d97eea372a Introduce a new node for holding call argument
flags.  This is needed by the new legalize types
infrastructure which wants to expand the 64 bit
constants previously used to hold the flags on
32 bit machines.  There are two functional changes:
(1) in LowerArguments, if a parameter has the zext
attribute set then that is marked in the flags;
before it was being ignored; (2) PPC had some bogus
code for handling two word arguments when using the
ELF 32 ABI, which was hard to convert because of
the bogusness.  As suggested by the original author
(Nicolas Geoffray), I've disabled it for the moment.
Tested with "make check" and the Ada ACATS testsuite.

llvm-svn: 48640
2008-03-21 09:14:45 +00:00
Chris Lattner a7cca362af detabify llvm, patch by Mike Stump!
llvm-svn: 48577
2008-03-20 01:22:40 +00:00
Nate Begeman fbbe80b597 Add support for escaping {} in asm strings, based on patch from Nick Burns.
llvm-svn: 48450
2008-03-17 07:26:14 +00:00
Christopher Lamb d3d0ad3f58 Make insert_subreg a two-address instruction, vastly simplifying LowerSubregs pass. Add a new TII, subreg_to_reg, which is like insert_subreg except that it takes an immediate implicit value to insert into rather than a register.
llvm-svn: 48412
2008-03-16 03:12:01 +00:00
Evan Cheng ec7533b620 Remove isImplicitDef TargetInstrDesc flag.
llvm-svn: 48381
2008-03-15 00:19:36 +00:00
Evan Cheng 0e7b00d79f Replace all target specific implicit def instructions with a target independent one: TargetInstrInfo::IMPLICIT_DEF.
llvm-svn: 48380
2008-03-15 00:03:38 +00:00