Dan Gohman
7170623b16
Begin making more use of the FastISelEmitter class.
...
llvm-svn: 55093
2008-08-21 00:19:05 +00:00
Owen Anderson
9371964f47
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Eli Friedman
873f65afe8
First cut at OS detection, taking advantage of the new generic targets.
...
This approach allows adding OS-specific targets/defines/etc. without
completely breaking unknown subtargets. No new subtargets yet, although
I plan to add x86-Linux soon. Others can add targets that they use as
needed; adding a new subtarget takes very little code.
Also does some fixups for description strings; a lot of them were
unspecified. I think all the ones I added are correct, but
they're unverified; corrections are welcome.
llvm-svn: 55091
2008-08-21 00:13:15 +00:00
Chris Lattner
0bed49ccd7
Fix an N^2 issue handling constant resolution due to RAUW in large arrays
...
this speeds up the bcreader from 6.67s to 0.12s on a testcase Daniel
provided. rdar://6158117
llvm-svn: 55090
2008-08-21 00:11:50 +00:00
Dan Gohman
6a0780cdd7
Fix unused variable warnings.
...
llvm-svn: 55089
2008-08-20 23:53:10 +00:00
Evan Cheng
f5a7e51c81
Silence a compiler warning.
...
llvm-svn: 55087
2008-08-20 23:36:48 +00:00
Eli Friedman
b9e5bed4dd
Class reorg for PPC; shouldn't be any visible changes unless I messed
...
up somehow.
This concludes the series of reorg patches for the target
implementations.
llvm-svn: 55086
2008-08-20 23:11:40 +00:00
Evan Cheng
864fcc198d
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
...
llvm-svn: 55085
2008-08-20 22:45:34 +00:00
Chris Lattner
b078e28338
Add a new ConstantExpr::getWithOperands that takes any array of operands
...
instead of requiring an std::vector.
llvm-svn: 55084
2008-08-20 22:27:40 +00:00
Eli Friedman
1be92d297a
Fix a regression from my fix to PR2631. Fixes PR2692.
...
llvm-svn: 55083
2008-08-20 22:17:17 +00:00
Eli Friedman
002ad1274b
Fix a minor crash-on-invalid.
...
llvm-svn: 55082
2008-08-20 22:07:34 +00:00
Dan Gohman
e6724d404b
Remove an obsolete todo comment.
...
llvm-svn: 55080
2008-08-20 21:47:28 +00:00
Dan Gohman
3e2225dfd6
Factor the code for determining the target-specific instruction
...
namespace out of the isel emitters and into common code.
llvm-svn: 55079
2008-08-20 21:45:57 +00:00
Dan Gohman
814f291664
Move the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATE
...
out of X86ISelDAGToDAG.cpp C++ code and into tablegen code.
Among other things, using tablegen for these things makes them
friendlier to FastISel.
Tablegen can handle the case of i8 subregs on x86-32, but currently
the C++ code for that case uses MVT::Flag in a tricky way, and it
happens to schedule better in some cases. So for now, leave the
C++ code in place to handle the i8 case on x86-32.
llvm-svn: 55078
2008-08-20 21:27:32 +00:00
Dan Gohman
a4305cec93
Simplify the BuildMI calls even more.
...
llvm-svn: 55077
2008-08-20 21:10:53 +00:00
Dan Gohman
02c84b8910
Simplify FastISel's constructor argument list, make the FastISel
...
class hold a MachineRegisterInfo member, and make the
MachineBasicBlock be passed in to SelectInstructions rather
than the FastISel constructor.
llvm-svn: 55076
2008-08-20 21:05:57 +00:00
Dan Gohman
43d1c7c607
Dump the instruction that foiled ISel even when -debug is not used.
...
llvm-svn: 55075
2008-08-20 20:47:32 +00:00
Bill Wendling
cd01e89852
Don't hoist instructions that define a physical register.
...
llvm-svn: 55074
2008-08-20 20:32:05 +00:00
Dan Gohman
07a34a5f69
Make more use of the BuildMI API.
...
llvm-svn: 55072
2008-08-20 18:16:32 +00:00
Dan Gohman
24e8f0cfe6
Minor code reorganization.
...
llvm-svn: 55071
2008-08-20 18:10:48 +00:00
Dan Gohman
2471f6ce0f
Minor whitespace cleanup.
...
llvm-svn: 55070
2008-08-20 18:09:38 +00:00
Dan Gohman
39a5ffb03f
Fix 80 column violation.
...
llvm-svn: 55069
2008-08-20 18:09:02 +00:00
Daniel Dunbar
73a73f52fd
Fix attributes on Obj-C interfaces & methods.
...
- Drop MethodAttrs parameter to ObjCMethodDecl
- Call ProcessDeclAttributeList for interface & method decls.
llvm-svn: 55068
2008-08-20 18:02:42 +00:00
Evan Cheng
7b9cd58596
Kill off SimpleBBISel, it's replaced by FastISel.
...
llvm-svn: 55067
2008-08-20 17:50:32 +00:00
Ted Kremenek
d0cb5056b0
Fix URL typo.
...
llvm-svn: 55066
2008-08-20 17:20:54 +00:00
Ted Kremenek
ec2875d715
Updated checker build.
...
llvm-svn: 55065
2008-08-20 17:19:58 +00:00
Ted Kremenek
e5edbdd4ee
Patch by Zhongxing Xu:
...
This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings().
llvm-svn: 55064
2008-08-20 17:08:29 +00:00
Chris Lattner
1ac3e2545b
Move the fast-path (<=i64) cases of various APInt methods inline
...
and the slow-path cases out of line. This speeds up instcombine
a bit in real world cases. Patch contributed by m-s.
llvm-svn: 55063
2008-08-20 17:02:31 +00:00
Ted Kremenek
eb38fde5e5
Patch by Zhongxing Xu: We should set back the modified ConstEq map.
...
llvm-svn: 55060
2008-08-20 16:59:15 +00:00
Dan Gohman
837c13a029
Disable DAGCombine's alignment inference in "fast" codegen mode.
...
llvm-svn: 55059
2008-08-20 16:30:28 +00:00
Dan Gohman
2da2bedc72
Change the FoldingSetNodeID usage for objects which carry
...
alignment and volatility information, such as loads and
stores, to reduce the number of integer values added to
the FoldingSetNodeID.
llvm-svn: 55058
2008-08-20 15:58:01 +00:00
Dan Gohman
3ad7e96f8a
Clean up a dead return missed in r55055.
...
llvm-svn: 55057
2008-08-20 15:54:46 +00:00
Dan Gohman
8823b0d245
Tablegen generated code already tests the opcode value, so it's not
...
necessary to use dyn_cast in these predicates.
llvm-svn: 55055
2008-08-20 15:24:22 +00:00
Dan Gohman
f6aa60ff71
Use BitVector instead of std::vector<unsigned char>.
...
llvm-svn: 55054
2008-08-20 14:58:41 +00:00
Dan Gohman
0f23237b0c
It's not necessary to check if a value is null before delete[].
...
llvm-svn: 55053
2008-08-20 14:55:37 +00:00
Dan Gohman
c8f9da50ec
Use cast instead of dyn_cast.
...
llvm-svn: 55052
2008-08-20 14:50:24 +00:00
Dan Gohman
c63a46ef39
Avoid an empty-if-body warning in release builds.
...
llvm-svn: 55050
2008-08-20 14:00:56 +00:00
Dan Gohman
1ed0681284
Fix indentation.
...
llvm-svn: 55049
2008-08-20 13:50:12 +00:00
Dan Gohman
a21bdda961
Fix comment spacing.
...
llvm-svn: 55047
2008-08-20 13:46:21 +00:00
Eli Friedman
f05b7728b3
Class reorg for ARM. Shouldn't be any visible changes.
...
llvm-svn: 55042
2008-08-20 07:44:10 +00:00
Eli Friedman
da8f5a9bd8
Class hierarchy reorg for Sparc architecture. While I was there, I
...
cleaned it up a bit, including fixing the definition of va_list; this
shouldn't break anything, but anyone using Sparc should watch for
regressions.
llvm-svn: 55041
2008-08-20 07:28:14 +00:00
Daniel Dunbar
94834d8883
Fix subtle bug introduced in r54852.
...
- UsualUnaryConversions takes an Expr *& and may modify its argument,
this broke when it was refactored into Sema::CheckCastTypes. This
meant that we were missing implicit casts in some places.
- Seems pretty sad that this got through our tests.
llvm-svn: 55039
2008-08-20 03:55:42 +00:00
Ted Kremenek
821159e352
Re-enable deletion of AST nodes upon completion of ParseAST.
...
llvm-svn: 55038
2008-08-20 03:27:00 +00:00
Ted Kremenek
0e857200bb
Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
...
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.
llvm-svn: 55037
2008-08-20 03:26:33 +00:00
Eli Friedman
3fd920afce
Reorganize the class hierarchy for x86 targets; shouldn't have any
...
visible effects, but this will significantly reduce the amount of
boilerplate code necessary to add subtargets.
If this looks okay, I'll do the rest of the processors (PPC, Sparc, ARM)
soon.
llvm-svn: 55036
2008-08-20 02:34:37 +00:00
Mon P Wang
1b2c061b73
Fixed shuffle optimizations to handle non power of 2 vectors
...
llvm-svn: 55035
2008-08-20 02:23:25 +00:00
Dan Gohman
b93b489c54
Fix the string for MVT::isVoid.
...
llvm-svn: 55034
2008-08-20 01:44:30 +00:00
Dan Gohman
e8f9a00424
Fix FastISel to recognize that the last block in the function does
...
not have a fall-through successor.
llvm-svn: 55033
2008-08-20 01:17:01 +00:00
Eli Friedman
5dd15a3c45
Fix test failure on Linux.
...
llvm-svn: 55032
2008-08-20 01:05:41 +00:00
Dan Gohman
98265cae87
Fix a leak in the FastISel code that Chris pointed out.
...
llvm-svn: 55031
2008-08-20 00:56:17 +00:00