Chris Lattner
758ce7260d
Fix shift overflow bug that would occur when a field was a full 32-bits
...
in tblgen. This is PR2827, thanks to Waldemar Knorr for tracking this
down.
llvm-svn: 57124
2008-10-05 18:31:58 +00:00
Chris Lattner
7e438ede4d
Make GenLibDeps.pl more robust in the face of broken piping problems.
...
Patch by Kenneth Boyd!
llvm-svn: 57057
2008-10-04 18:03:46 +00:00
Dale Johannesen
867d549fce
Handle some 64-bit atomics on x86-32, some of the time.
...
llvm-svn: 56963
2008-10-02 18:53:47 +00:00
Dan Gohman
b486350b15
Move the primary fast-isel top-level comments to FastISel.cpp, where
...
they'll be a little more visible. Also, update and reword them a bit.
llvm-svn: 56877
2008-09-30 20:48:29 +00:00
Dan Gohman
843fe14fab
Move the code that handles DAGISel error conditions into
...
helper functions instead of duplicating it inline each time
it is needed. This eliminates a few hundred or so copies
of this code in each target.
llvm-svn: 56759
2008-09-27 23:53:14 +00:00
Dan Gohman
6e0548336a
Rename ConstantSDNode's getSignExtended to getSExtValue, for
...
consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.
llvm-svn: 56700
2008-09-26 21:54:37 +00:00
Devang Patel
4c758ea3e0
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Mikhail Glushenkov
53aa586844
Move llvmc2 header files under include/llvm/CompilerDriver
...
llvm-svn: 56466
2008-09-22 20:50:40 +00:00
Mikhail Glushenkov
47afe73081
Plugin support for llvmc2 (a-la opt).
...
llvm-svn: 56465
2008-09-22 20:49:34 +00:00
Mikhail Glushenkov
4825a0bb2f
Make comments a little bit more clear.
...
llvm-svn: 56463
2008-09-22 20:48:22 +00:00
Mikhail Glushenkov
8a2bdc74b2
Get rid of GlobalLanguageMap. Global state is evil.
...
llvm-svn: 56462
2008-09-22 20:47:46 +00:00
Mikhail Glushenkov
9c13f724fc
Add a (forward_as) option property
...
llvm-svn: 56459
2008-09-22 20:46:19 +00:00
Mikhail Glushenkov
b50080e6cb
Delete the file llvmc2/doc/LLVMC-Enhancements.rst + some minor language/spelling fixes.
...
llvm-svn: 56458
2008-09-22 20:45:17 +00:00
Oscar Fuentes
a229b3c9a7
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Evan Cheng
038ca4aa0f
Add instruction names as comments to InstBits entries.
...
llvm-svn: 56275
2008-09-17 06:29:52 +00:00
Devang Patel
3fccede02a
Remove.
...
llvm-svn: 56256
2008-09-16 22:26:44 +00:00
Bill Wendling
24c79f28b1
Reverting r56249. On further investigation, this functionality isn't needed.
...
Apologies for the thrashing.
llvm-svn: 56251
2008-09-16 21:48:12 +00:00
Bill Wendling
8bc392fb1d
- Change "ExternalSymbolSDNode" to "SymbolSDNode".
...
- Add linkage to SymbolSDNode (default to external).
- Change ISD::ExternalSymbol to ISD::Symbol.
- Change ISD::TargetExternalSymbol to ISD::TargetSymbol
These changes pave the way to allowing SymbolSDNodes with non-external linkage.
llvm-svn: 56249
2008-09-16 21:12:30 +00:00
Devang Patel
4089ccb0fa
Extract optimization pass selection code from llvm-gcc into a separate routine.
...
This can be used by other stand alone tools, such as 'opt'.
llvm-svn: 56229
2008-09-15 21:13:42 +00:00
Dan Gohman
46673ad82a
Update the LLVM polygen grammar for recent language changes:
...
x86_ssecallcc, function notes, and some whitespace adjustments.
llvm-svn: 56221
2008-09-15 16:10:51 +00:00
Dan Gohman
ec270fb640
Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
...
ConstantFP* instead of APInt and APFloat directly.
This reduces the amount of time to create ConstantSDNode
and ConstantFPSDNode nodes when ConstantInt* and ConstantFP*
respectively are already available, as is the case in
SelectionDAGBuild.cpp. Also, it reduces the amount of time
to legalize constants into constant pools, and the amount of
time to add ConstantFP operands to MachineInstrs, due to
eliminating ConstantInt::get and ConstantFP::get calls.
It increases the amount of work needed to create new constants
in cases where the client doesn't already have a ConstantInt*
or ConstantFP*, such as legalize expanding 64-bit integer constants
to 32-bit constants. And it adds a layer of indirection for the
accessor methods. But these appear to be outweight by the benefits
in most cases.
It will also make it easier to make ConstantSDNode and
ConstantFPNode more consistent with ConstantInt and ConstantFP.
llvm-svn: 56162
2008-09-12 18:08:03 +00:00
Dan Gohman
effb894453
Rename ConstantSDNode::getValue to getZExtValue, for consistency
...
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.
llvm-svn: 56159
2008-09-12 16:56:44 +00:00
Evan Cheng
c5af471be5
Indentation.
...
llvm-svn: 56107
2008-09-11 17:31:12 +00:00
Jim Grosbach
56938af9e2
lib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted
...
by its first field, but TableGen doesn't actually enforce creating it that
way. TableGen sorts the records that will be used to create it by the names
of the records, not the Name field of those records.
This patch corrects the sort to use the "Name" field of the record as the
sort key.
llvm-svn: 56106
2008-09-11 17:05:32 +00:00
Evan Cheng
f66e1120c6
Change getSubReg semantics. It now returns zero if the specified register doesn't have a subreg of the specified index.
...
llvm-svn: 56099
2008-09-11 06:25:25 +00:00
Dan Gohman
f6ac018926
Fix typos in (generated) comments.
...
llvm-svn: 55916
2008-09-08 16:29:36 +00:00
Evan Cheng
ca14c07175
Correctly handle physical register inputs. They are not explicit input operands in the resulting machine instrs.
...
llvm-svn: 55893
2008-09-08 08:39:33 +00:00
Evan Cheng
105c581135
Eliminate a compile time warning.
...
llvm-svn: 55878
2008-09-07 09:00:57 +00:00
Evan Cheng
09638d34a5
Fix indentation of generated code.
...
llvm-svn: 55876
2008-09-07 08:23:06 +00:00
Evan Cheng
7cab17af29
Ignore multi-instruction patterns. e.g.
...
def : Pat<(i8 (trunc GR32:$src)),
(i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))>
llvm-svn: 55875
2008-09-07 08:19:51 +00:00
Evan Cheng
24422d4928
Let tblgen only generate fastisel routines, not the class definition. This makes it easier for targets to define its own fastisel class.
...
llvm-svn: 55679
2008-09-03 00:03:49 +00:00
Evan Cheng
34f3a962b0
Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
...
llvm-svn: 55623
2008-09-02 06:51:36 +00:00
Owen Anderson
0673a8af14
Add initial support for fast isel of instructions that have inputs pinned to physical registers.
...
llvm-svn: 55545
2008-08-29 17:45:56 +00:00
Dan Gohman
d58f3e36d0
Add a target callback for FastISel.
...
llvm-svn: 55512
2008-08-28 23:21:34 +00:00
Gabor Greif
76a6d27a71
just a brain dump for a small tool
...
that brings us to 80-col violations
or tabs.
Usage:
visit-violations <file>
At the moment it outputs editor invocations.
llvm-svn: 55509
2008-08-28 23:15:28 +00:00
Gabor Greif
f304a7aa4d
erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics
...
llvm-svn: 55504
2008-08-28 21:40:38 +00:00
Owen Anderson
787f100462
Add support for fast-isel of opcodes that require use of extract_subreg. Because of how extract_subreg is treated, it requires special case handling.
...
llvm-svn: 55480
2008-08-28 18:06:12 +00:00
Dan Gohman
6d153b02c9
Update a comment to reflect recent changes.
...
llvm-svn: 55418
2008-08-27 16:18:22 +00:00
Dan Gohman
5ca269e684
Basic FastISel support for floating-point constants.
...
llvm-svn: 55401
2008-08-27 01:09:54 +00:00
Gabor Greif
abfdf928d8
disallow direct access to SDValue::ResNo, provide a getter instead
...
llvm-svn: 55394
2008-08-26 22:36:50 +00:00
Dan Gohman
44003cc354
Refactor a bunch of FastISelEmitter code into a helper class, and
...
put each major step in a separate function. This makes the high
level sequence of events easier to follow.
llvm-svn: 55385
2008-08-26 21:21:20 +00:00
Cedric Venet
cf7154b2d6
- small bug corrected: incorrect iterator type.
...
- fix to please VS: add a return after an assert.
llvm-svn: 55380
2008-08-26 19:49:04 +00:00
Owen Anderson
3ea3efec44
We need to check that the return type is correct, even in cases where we don't
...
have a return type that differs from the operand types.
llvm-svn: 55376
2008-08-26 18:50:00 +00:00
Chris Lattner
491a930ea3
code simplification, no functionality change.
...
llvm-svn: 55363
2008-08-26 07:01:28 +00:00
Chris Lattner
345dcce5a6
stabilize more printing, this doesn't cause a problem
...
in the example attached to PR2590, but is a problem in general.
llvm-svn: 55361
2008-08-26 06:50:46 +00:00
Chris Lattner
ef820d2ef9
stablize SubRegsSet printing, part of PR2590
...
llvm-svn: 55360
2008-08-26 06:49:06 +00:00
Chris Lattner
bd7ccd0162
Stabilize 'getDwarfRegNumFull' output to not depend on random memory
...
orders, part of PR2590
llvm-svn: 55359
2008-08-26 06:43:25 +00:00
Owen Anderson
6f2db7238b
Throw the switch to allow FastISel to emit instructions whose return types different from their inputs. Next step: adding lowering pattens in FastISel that actually use these newly available opcodes.
...
llvm-svn: 55349
2008-08-26 01:22:59 +00:00
Owen Anderson
5f334d8215
Enhance TableGen to emit code for FastISel of opcodes with variadic return types without slowing down opcodes that are not variadic. No such opcodes are currently generated, but in theory it should be a matter of just hitting the switch.
...
llvm-svn: 55347
2008-08-26 00:42:26 +00:00
Owen Anderson
8dd01ccdd8
Add a RetVT parameter to emitted FastISel methods, so that we will be able to pass the desired return
...
type down. This is not currently used.
llvm-svn: 55345
2008-08-25 23:58:18 +00:00