Gordon Henriksen
8e4ae9a345
Trying that again.
...
llvm-svn: 45529
2008-01-03 03:32:33 +00:00
Gordon Henriksen
b28803a63f
Fix a compile error on Windows.
...
llvm-svn: 45528
2008-01-03 03:21:18 +00:00
Evan Cheng
fb2bc4fc95
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
...
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
llvm-svn: 45527
2008-01-03 02:56:28 +00:00
Chris Lattner
6c74a2cbcb
don't access element zero of an array of size zero.
...
llvm-svn: 45526
2008-01-03 01:25:31 +00:00
Chris Lattner
c613164542
Remove the function attr cache for intrinsics. This does not maintain the
...
refcount on these correctly, and can end up referring to deleted
attributes. This fixes PR1881.
llvm-svn: 45525
2008-01-03 01:20:12 +00:00
Chris Lattner
e54252e6e1
Don't create a new ParamAttrsList (which copies the vector) just to
...
get a profile.
llvm-svn: 45524
2008-01-03 00:29:27 +00:00
Duncan Sands
cc3a49623f
An example for which the TYPE_SIZE was being set from
...
the initial value, while the type fields were not (this
is a qualified union type, so not all fields are always
present). This resulted in the size of the corresponding
LLVM type being larger than the gcc TYPE_SIZE.
llvm-svn: 45522
2008-01-03 00:26:42 +00:00
Duncan Sands
fcb856ad1e
Test handling of records for which the fields are
...
not ordered by offset.
llvm-svn: 45520
2008-01-03 00:17:02 +00:00
Chris Lattner
e14d4d026e
move some code out of line, rearrange a bit.
...
llvm-svn: 45519
2008-01-03 00:10:22 +00:00
Chris Lattner
8634e197c3
Disallow copying explicitly.
...
llvm-svn: 45518
2008-01-03 00:09:47 +00:00
Chris Lattner
9ec341b120
Split param attr implementation out from Function.cpp into its
...
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.
llvm-svn: 45517
2008-01-02 23:42:30 +00:00
Chris Lattner
028f584087
add missing #include
...
llvm-svn: 45516
2008-01-02 23:41:05 +00:00
Evan Cheng
ba1fd9fc76
X86 PIC JIT bug fix: relocations for constantpool and jumptable.
...
llvm-svn: 45515
2008-01-02 23:38:59 +00:00
Chris Lattner
25b9530d7b
remove blob of #if'd out code.
...
llvm-svn: 45512
2008-01-02 23:10:45 +00:00
Chris Lattner
7d567adef9
fix this to use a valid triple.
...
llvm-svn: 45509
2008-01-02 22:21:45 +00:00
Ted Kremenek
08801d9556
Inverted argument order for ImmutableMap::Profile.
...
llvm-svn: 45507
2008-01-02 22:18:33 +00:00
Chris Lattner
93a70c4a0e
Fix a build issue on cygwin
...
llvm-svn: 45506
2008-01-02 22:03:27 +00:00
Ted Kremenek
a44206f579
Added iterator and profiling (i.e. FoldingSetNodeID) support to ImmutableMap.
...
llvm-svn: 45503
2008-01-02 21:31:48 +00:00
Chris Lattner
8afe60d634
Fix PR1888, patch by Wilhansen Li.
...
llvm-svn: 45501
2008-01-02 21:30:58 +00:00
Chris Lattner
ddf03e12a2
Fix a build problem with VC++ by not doing the target prefix
...
comparison for every builtin. This reduces the depth of
the if/elseif chain dramatically.
llvm-svn: 45500
2008-01-02 21:24:22 +00:00
Bill Wendling
c677923991
Use the correct MachineRegisterInfo object.
...
llvm-svn: 45499
2008-01-02 21:10:54 +00:00
Bill Wendling
92d8ff0471
Machine LICM will check that operands are defined outside of the loop. Also
...
check that register isn't 0 before going further.
llvm-svn: 45498
2008-01-02 21:10:40 +00:00
Bill Wendling
005b47c20c
Remove dead code.
...
llvm-svn: 45496
2008-01-02 20:47:37 +00:00
Chris Lattner
fbd8cc03c8
verify that aligned common support doesn't break.
...
llvm-svn: 45495
2008-01-02 19:48:24 +00:00
Chris Lattner
4a0d9c7836
darwin9 and above support aligned common symbols.
...
llvm-svn: 45494
2008-01-02 19:44:55 +00:00
Chris Lattner
abd12447f8
leopard and above support alignment for common symbols.
...
llvm-svn: 45493
2008-01-02 19:35:16 +00:00
Bill Wendling
5843183ca2
Use the new architecture to get the containing machine basic block for a machine
...
instruction. Also, use "splice" to move the new instruction instead of
remove/insert (where it was leaking memory anyway).
llvm-svn: 45492
2008-01-02 19:32:43 +00:00
Nick Lewycky
ea4de32234
Don't be rude, emit debugging info where asked to.
...
llvm-svn: 45485
2008-01-02 02:49:20 +00:00
Owen Anderson
e6856128ab
Move some more instruction creation methods from RegisterInfo into InstrInfo.
...
llvm-svn: 45484
2008-01-01 21:11:32 +00:00
Chris Lattner
fc976a38ff
Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the def of the vreg at the start of the list, so the list doesn't need to be traversed.
...
llvm-svn: 45483
2008-01-01 21:08:22 +00:00
Chris Lattner
490a9681cb
switch the register iterator to act more like hte LLVM value iterator: dereferencing
...
it now returns the machineinstr of the use. To get the operand, use I.getOperand().
Add a new MachineRegisterInfo::replaceRegWith, which is basically like
Value::replaceAllUsesWith.
llvm-svn: 45482
2008-01-01 20:36:19 +00:00
Gordon Henriksen
d2485b2cec
Adding C bindings for SwitchInst::addCase.
...
Patch by Bryan O'Sullivan!
llvm-svn: 45481
2008-01-01 05:50:53 +00:00
Chris Lattner
7091807c2d
Add a trivial but handy function to efficiently return the machine
...
instruction that defines the specified vreg. Crazy.
llvm-svn: 45480
2008-01-01 03:07:29 +00:00
Chris Lattner
73f957d96f
add efficient iteration support for register use/def's
...
within a machine function.
llvm-svn: 45479
2008-01-01 02:55:32 +00:00
Bill Wendling
e6898cbe7a
Update this testcase. The output needs to be disabled to pass.
...
llvm-svn: 45478
2008-01-01 01:34:36 +00:00
Chris Lattner
39b56ec51b
Implement automatically updated def/use lists for all MachineInstr register
...
operands. The lists are currently kept in MachineRegisterInfo, but it does
not yet provide an iterator interface to them.
llvm-svn: 45477
2008-01-01 01:12:31 +00:00
Chris Lattner
04a35e9a8c
Fix a bug in my previous patch: refer to the impl not the pure virtual version. It's unclear why gcc would ever compile this...
...
llvm-svn: 45476
2008-01-01 01:05:34 +00:00
Chris Lattner
1285ec2ae7
Fix a problem where lib/Target/TargetInstrInfo.h would include and use
...
a header file from libcodegen. This violates a layering order: codegen
depends on target, not the other way around. The fix to this is to
split TII into two classes, TII and TargetInstrInfoImpl, which defines
stuff that depends on libcodegen. It is defined in libcodegen, where
the base is not.
llvm-svn: 45475
2008-01-01 01:03:04 +00:00
Chris Lattner
48d3d78bcf
Factor out makefile dependency generation better.
...
Don't include system headers in the .d files.
Don't use $@ in the makefile rules, as there are two possible targets it could resolve to: use the one that we need explicitly.
llvm-svn: 45473
2007-12-31 23:58:31 +00:00
Duncan Sands
8a4882564a
Fix PR1833 - eh.exception and eh.selector return two
...
values, which means doing extra legalization work.
It would be easier to get this kind of thing right if
there was some documentation...
llvm-svn: 45472
2007-12-31 18:35:50 +00:00
Owen Anderson
ae7e2c1e03
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the
...
Machine-level API cleanup instigated by Chris.
llvm-svn: 45470
2007-12-31 06:32:00 +00:00
Chris Lattner
d8b7ecd871
properly encapsulate the parent field of MBB and MI with get/set accessors.
...
llvm-svn: 45469
2007-12-31 04:56:33 +00:00
Chris Lattner
de54e62962
update a couple of references to SSARegMap.
...
llvm-svn: 45468
2007-12-31 04:16:08 +00:00
Chris Lattner
96167aa93c
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
...
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.
Update all the clients to match.
This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.
llvm-svn: 45467
2007-12-31 04:13:23 +00:00
Gordon Henriksen
e4503f2e29
Removing obsolete files from the Xcode project.
...
llvm-svn: 45466
2007-12-31 01:45:55 +00:00
Chris Lattner
4a7a91b128
slightly simplify and document SSARegMap.
...
llvm-svn: 45465
2007-12-30 23:40:31 +00:00
Chris Lattner
9e5cc35593
Add new shorter predicates for testing machine operands for various types:
...
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
llvm-svn: 45464
2007-12-30 23:10:15 +00:00
Gordon Henriksen
0f21fdb054
Another backwards compatibility fix.
...
llvm-svn: 45463
2007-12-30 22:48:58 +00:00
Chris Lattner
3343642406
- rename opType -> OpKind and contents -> Contents.
...
- eliminate the auxInfo union, merging it into the contents union. This shaves
4 bytes off MachineOperand on a 32-bit machine.
- Use accessors in ctor methods.
- Add comments.
llvm-svn: 45462
2007-12-30 22:24:06 +00:00
Chris Lattner
7504adbd72
More cleanups for MachineOperand:
...
- Eliminate the static "print" method for operands, moving it
into MachineOperand::print.
- Change various set* methods for register flags to take a bool
for the value to set it to. Remove unset* methods.
- Group methods more logically by operand flavor in MachineOperand.h
llvm-svn: 45461
2007-12-30 21:56:09 +00:00