Commit Graph

39510 Commits

Author SHA1 Message Date
Gordon Henriksen 8624d7b72e Fix a compile error on Windows.
llvm-svn: 45528
2008-01-03 03:21:18 +00:00
Evan Cheng 563fcc3428 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 e35604ddb2 don't access element zero of an array of size zero.
llvm-svn: 45526
2008-01-03 01:25:31 +00:00
Chris Lattner 76719ba5f1 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 b18b0b99c6 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 a7f7ac7072 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 1d03fb4e7e 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 d0e1f10078 move some code out of line, rearrange a bit.
llvm-svn: 45519
2008-01-03 00:10:22 +00:00
Chris Lattner d135068e53 Disallow copying explicitly.
llvm-svn: 45518
2008-01-03 00:09:47 +00:00
Chris Lattner 3e13b8c173 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 d2b0e15535 add missing #include
llvm-svn: 45516
2008-01-02 23:41:05 +00:00
Evan Cheng 96334b4e3b X86 PIC JIT bug fix: relocations for constantpool and jumptable.
llvm-svn: 45515
2008-01-02 23:38:59 +00:00
Chris Lattner 04cd35f88b remove blob of #if'd out code.
llvm-svn: 45512
2008-01-02 23:10:45 +00:00
Fariborz Jahanian 8361552af9 New declarations/defs for Objc2's foreach-statement. This is work in progress.
llvm-svn: 45511
2008-01-02 22:54:34 +00:00
Chris Lattner 4f20351142 When promoting array to pointer for argument, don't lose type qualifiers.
llvm-svn: 45510
2008-01-02 22:50:48 +00:00
Chris Lattner 41e423a6f5 fix this to use a valid triple.
llvm-svn: 45509
2008-01-02 22:21:45 +00:00
Ted Kremenek 161807f8d1 SimulVertex: Inverted argument order when calling the Profile method of StateTy.
SimulGraph: Inverted argument order when calling the Profile method of VertexTy
  (plus minor cleanups)
llvm-svn: 45508
2008-01-02 22:20:20 +00:00
Ted Kremenek a26f5d188f Inverted argument order for ImmutableMap::Profile.
llvm-svn: 45507
2008-01-02 22:18:33 +00:00
Chris Lattner 0acc15c470 Fix a build issue on cygwin
llvm-svn: 45506
2008-01-02 22:03:27 +00:00
Chris Lattner 7977cca8e8 Fix PR1895: a crash on an ugly gcc extension.
llvm-svn: 45505
2008-01-02 21:54:09 +00:00
Chris Lattner 266a2ff3ac Compute the proper sourcerange for an CompoundLiteralExpr.
llvm-svn: 45504
2008-01-02 21:46:24 +00:00
Ted Kremenek d7c6b0e664 Added iterator and profiling (i.e. FoldingSetNodeID) support to ImmutableMap.
llvm-svn: 45503
2008-01-02 21:31:48 +00:00
Ted Kremenek c7523bcaaa Converted state reference within SimulVertex from StateTy* to StateTy.
This is more flexible.

llvm-svn: 45502
2008-01-02 21:31:13 +00:00
Chris Lattner 9a6774064b Fix PR1888, patch by Wilhansen Li.
llvm-svn: 45501
2008-01-02 21:30:58 +00:00
Chris Lattner 91678fc457 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 0ba4184404 Use the correct MachineRegisterInfo object.
llvm-svn: 45499
2008-01-02 21:10:54 +00:00
Bill Wendling e1f28e7871 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
Chris Lattner 54bb810997 Refactor the decl printer, patch by Mike Stump!
llvm-svn: 45497
2008-01-02 21:04:16 +00:00
Bill Wendling f0b37780ca Remove dead code.
llvm-svn: 45496
2008-01-02 20:47:37 +00:00
Chris Lattner 5d998c5712 verify that aligned common support doesn't break.
llvm-svn: 45495
2008-01-02 19:48:24 +00:00
Chris Lattner cce79c67ca darwin9 and above support aligned common symbols.
llvm-svn: 45494
2008-01-02 19:44:55 +00:00
Chris Lattner dcbc0f3029 leopard and above support alignment for common symbols.
llvm-svn: 45493
2008-01-02 19:35:16 +00:00
Bill Wendling 5da1945cdd 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
Fariborz Jahanian 056e3a4e90 Issue diagnostic when objective-c's @interface is preceeded by a type specifier.
llvm-svn: 45491
2008-01-02 19:17:38 +00:00
Ted Kremenek 796b64337b Added/fixed some comments.
llvm-svn: 45490
2008-01-02 18:31:49 +00:00
Fariborz Jahanian 5e57e1890d Prevent crash on incorrect objc messaging expression.
llvm-svn: 45489
2008-01-02 18:09:46 +00:00
Ted Kremenek dc8ebe5022 Sprinkled 'typename' and fixed a few typos and type declaration errors to
make these headers compile.

llvm-svn: 45488
2008-01-02 17:45:00 +00:00
Ted Kremenek 2290828271 Added fixme.
llvm-svn: 45487
2008-01-02 17:05:47 +00:00
Ted Kremenek 032cb4433e Allocate vertices using a BumpPtrAllocator.
llvm-svn: 45486
2008-01-02 17:00:32 +00:00
Nick Lewycky d1200b00dc Don't be rude, emit debugging info where asked to.
llvm-svn: 45485
2008-01-02 02:49:20 +00:00
Owen Anderson eee14601b1 Move some more instruction creation methods from RegisterInfo into InstrInfo.
llvm-svn: 45484
2008-01-01 21:11:32 +00:00
Chris Lattner caaf8aae4d 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 0cb9dd7aa2 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 097102c32a Adding C bindings for SwitchInst::addCase.
Patch by Bryan O'Sullivan!

llvm-svn: 45481
2008-01-01 05:50:53 +00:00
Chris Lattner 39204d76c5 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 8a497053a7 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 6f8c9a8372 Update this testcase. The output needs to be disabled to pass.
llvm-svn: 45478
2008-01-01 01:34:36 +00:00
Chris Lattner 961e7427ea 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 b0fb17fd34 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 25568e4cef 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