Duncan Sands
2400ad7236
Introduce and use convenience methods for getting pointer types
...
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Jim Grosbach
d8a4aaa624
grammar
...
llvm-svn: 83378
2009-10-06 15:03:44 +00:00
Devang Patel
bad114ca60
Fix cut-n-pasto.
...
llvm-svn: 83367
2009-10-06 03:15:38 +00:00
Devang Patel
2fb4294e97
Update processDebugLoc() to handle requests to process debug info, before and after emitting instructions.
...
llvm-svn: 83364
2009-10-06 03:04:58 +00:00
Devang Patel
a8f35ac640
Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
...
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel
3200e99109
Remove dead code.
...
llvm-svn: 83362
2009-10-06 02:01:32 +00:00
Devang Patel
0141a90812
Add utility routine to set begin and end labels for DbgScopes.
...
This will be used by processDebugLoc().
llvm-svn: 83361
2009-10-06 01:50:42 +00:00
Devang Patel
2001f5878b
Remove unintentional function decl.
...
llvm-svn: 83356
2009-10-06 01:31:35 +00:00
Devang Patel
ac511d1acf
Add utility routine to collect variable debug info. This is not yet used.
...
llvm-svn: 83355
2009-10-06 01:26:37 +00:00
Jeffrey Yasskin
4b011e6a51
Fix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittests
...
check-lit` on both x86-64 Linux and x86-32 Darwin.
llvm-svn: 83353
2009-10-06 00:35:55 +00:00
Devang Patel
6a7f2ee022
Set default location for the function if it is not already set.
...
This code is not yet enabled.
llvm-svn: 83349
2009-10-06 00:09:08 +00:00
Devang Patel
3b3d8a9d09
Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.
...
llvm-svn: 83348
2009-10-06 00:03:14 +00:00
Devang Patel
f129b0d44f
If subprogram die is not available then construct new one.
...
This can happen if debug info is processed lazily.
llvm-svn: 83347
2009-10-05 23:59:00 +00:00
Devang Patel
dff583ac49
Adjust context for the global variables that are not at file scope, e.g.
...
void foo() { static int bar = 42; }
Here, foo's DIE is parent of bar's DIE.
llvm-svn: 83344
2009-10-05 23:40:42 +00:00
Devang Patel
4e9591a170
Set address while constructing DIE.
...
llvm-svn: 83343
2009-10-05 23:22:08 +00:00
Evan Phoenix
1b803795c7
Extend ConstantFolding to understand signed overflow variants
...
llvm-svn: 83338
2009-10-05 22:53:52 +00:00
Jim Grosbach
d6da133b85
In Thumb1, the register scavenger is not always able to use an emergency
...
spill slot. When frame references are via the frame pointer, they will be
negative, but Thumb1 load/store instructions only allow positive immediate
offsets. Instead, Thumb1 will spill to R12.
llvm-svn: 83336
2009-10-05 22:30:23 +00:00
Torok Edwin
1a53fd9356
Don't treat malloc calls with non-matching prototype as malloc.
...
Fixes second part of PR5130, miscompilation in FreeBSD kernel, where malloc takes 3 params,
and *does* initialize memory.
llvm-svn: 83324
2009-10-05 21:15:43 +00:00
Edward O'Callaghan
8b7189e234
No newline at end of files.
...
llvm-svn: 83318
2009-10-05 18:43:19 +00:00
Devang Patel
28b7c6155c
Gracefully handle various scopes while recording source line info.
...
llvm-svn: 83317
2009-10-05 18:03:19 +00:00
Dan Gohman
176e47a413
Remove an unnnecessary LLVMContext argument in
...
ConstantFoldLoadThroughGEPConstantExpr.
llvm-svn: 83311
2009-10-05 16:36:26 +00:00
Dan Gohman
a926123a24
Use Use::operator= instead of Use::set, for consistency.
...
llvm-svn: 83310
2009-10-05 16:31:55 +00:00
Dan Gohman
cc0c3fe456
Remove explicit enum integer values. They don't appear to be needed, and
...
they make it less convenient to add new entries.
llvm-svn: 83308
2009-10-05 15:52:08 +00:00
Dan Gohman
b38864fb37
Add RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
...
is used in an operand which requires GR64_NOREX.
llvm-svn: 83307
2009-10-05 15:42:08 +00:00
Chris Lattner
a3cf123e86
strength reduce a ton of type equality tests to check the typeid (Through
...
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Chris Lattner
7d19c8841c
teach the optimizer how to constant fold uadd/usub intrinsics.
...
llvm-svn: 83295
2009-10-05 05:26:04 +00:00
Chris Lattner
8b72a24a35
simplify this code a bunch.
...
llvm-svn: 83294
2009-10-05 05:06:24 +00:00
Chris Lattner
24a77e2ade
code simplifications.
...
llvm-svn: 83292
2009-10-05 05:00:35 +00:00
Chris Lattner
513b66b237
instcombine shouldn't delete all null checks for mallocs.
...
This fixes PR5130.
llvm-svn: 83290
2009-10-05 02:47:47 +00:00
Chris Lattner
2c0a4fb325
stop MachineFunctionPass from claiming that it preserves LoopDependence info,
...
which causes dependence info to be linked into lli.
llvm-svn: 83289
2009-10-05 02:35:05 +00:00
Chris Lattner
1aa661ce46
remove llvm-db: it is completely broken and if anyone wants to do a debugger,
...
they should not base it on llvm-db (which not following almost any "best practices").
llvm-svn: 83288
2009-10-05 02:29:51 +00:00
Owen Anderson
412df08b59
Do away with the strange use of BitVectors in SSI, and just use normal sets. This makes the code much more C++/LLVM-ish.
...
llvm-svn: 83286
2009-10-04 18:49:55 +00:00
Jakob Stoklund Olesen
61a76937ee
Whitespace and formatting.
...
llvm-svn: 83285
2009-10-04 18:18:39 +00:00
Owen Anderson
cadab85644
Fix a typo in the comment.
...
llvm-svn: 83283
2009-10-04 17:52:13 +00:00
Owen Anderson
18cecec6a0
SSI needs to require DT and DF transitively, since it uses them outside of its runOnFunction.
...
Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction.
llvm-svn: 83282
2009-10-04 17:47:39 +00:00
Evan Cheng
eae1bb9779
Allow -inline-threshold override default threshold even if compiling to optimize for size.
...
llvm-svn: 83274
2009-10-04 06:13:54 +00:00
Nick Lewycky
5bf0eb2dd5
Requires element types in a constant initializer to match the element types of
...
of the constant. This reverts r6544 and r7428.
llvm-svn: 83270
2009-10-03 19:30:43 +00:00
Bob Wilson
64ce6ef65a
Add a comment to describe letters used in multiclass name suffixes.
...
llvm-svn: 83257
2009-10-03 04:44:16 +00:00
Bob Wilson
be258e083a
Fix encoding problem for VMLS instruction.
...
Thanks to Johnny Chen for pointing this out!
llvm-svn: 83256
2009-10-03 04:41:21 +00:00
Lang Hames
40530eacdb
Oops. Renamed remaining MachineInstrIndex references.
...
llvm-svn: 83255
2009-10-03 04:31:31 +00:00
Lang Hames
f6903a7043
Renamed MachineInstrIndex to LiveIndex.
...
llvm-svn: 83254
2009-10-03 04:21:37 +00:00
Benjamin Kramer
8cebbc5761
MingW build fixes
...
- MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem.
Noticed by Ronald Pijnacker!
- Some parts of the System library must be build with exceptions on windows.
Based on a patch by Jay Foad!
llvm-svn: 83251
2009-10-02 19:36:31 +00:00
Benjamin Kramer
aa33886dd7
Fix a use-after-free in post-ra-scheduling.
...
MI->addOperand invalidates references to it's operands, avoid touching
the operand after a new one was added.
llvm-svn: 83249
2009-10-02 15:59:52 +00:00
Evan Cheng
8cf9f56cca
getFunctionAlignment should return log2 alignment.
...
llvm-svn: 83242
2009-10-02 06:57:25 +00:00
Evan Cheng
5b9107c1b9
Forgot about ARM::tPUSH. It also has a new writeback operand.
...
llvm-svn: 83237
2009-10-02 05:03:07 +00:00
Evan Cheng
d6e64a4cfd
Move load / store multiple before post-alloc scheduling.
...
llvm-svn: 83236
2009-10-02 04:57:15 +00:00
David Goodwin
cb4a66977c
All callee-saved registers are live-out of a return block.
...
llvm-svn: 83223
2009-10-01 23:28:47 +00:00
David Goodwin
a4b73e486e
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
...
llvm-svn: 83218
2009-10-01 22:19:57 +00:00
Mike Stump
532ed49e39
Expand api out in the usual inserter way, though, I do have a
...
question, can we get rid of the BasicBlock versions of all inserters
and use Head == 0 to indicate the old case when GetInsertBlock == 0?
llvm-svn: 83216
2009-10-01 22:08:58 +00:00
David Goodwin
d0edce4c0d
Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
...
llvm-svn: 83215
2009-10-01 21:46:35 +00:00
Evan Cheng
272a738580
ARM::tPOP and tPOP_RET each has an extra writeback operand now.
...
llvm-svn: 83214
2009-10-01 20:54:53 +00:00
Devang Patel
7aa19711f8
Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
...
This is not yet enabled.
llvm-svn: 83210
2009-10-01 20:31:14 +00:00
David Goodwin
0a7770b3e0
Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
...
llvm-svn: 83208
2009-10-01 19:45:32 +00:00
Devang Patel
7b4ba71afa
Record first and last instruction of a scope in DbgScope.
...
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Evan Cheng
68d79a17a0
Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
...
operands of instructions with these properties while breaking anti-dep.
llvm-svn: 83198
2009-10-01 08:26:23 +00:00
Evan Cheng
241092d89f
Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
...
ld / st pairs, etc.
llvm-svn: 83197
2009-10-01 08:22:27 +00:00
Douglas Gregor
b4e6fce681
Remove GVNPRE.cpp from the CMake makefile
...
llvm-svn: 83194
2009-10-01 05:30:05 +00:00
Chris Lattner
857ed445a8
remove the GVNPRE pass. It has been subsumed by the GVN pass.
...
Ok'd by Owen.
llvm-svn: 83193
2009-10-01 02:18:36 +00:00
Evan Cheng
dc5ac208bf
Update ARM JIT emitter to account for ld/st multiple changes.
...
llvm-svn: 83192
2009-10-01 01:39:21 +00:00
Evan Cheng
4dd7d7156e
Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.
...
llvm-svn: 83191
2009-10-01 01:33:39 +00:00
Devang Patel
4f1147e386
Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
...
llvm-svn: 83190
2009-10-01 01:15:28 +00:00
Devang Patel
d24ba7a101
If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
...
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Devang Patel
e097bf49d0
Use MachineInstr as an processDebugLoc() argument.
...
This will allow processDebugLoc() to handle scopes for DWARF debug info.
llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Devang Patel
044648c2d7
Use MDNode * directly as an RecordSourceLine() argument.
...
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Devang Patel
ef84ca6011
Remove dead code.
...
llvm-svn: 83181
2009-09-30 22:43:52 +00:00
Devang Patel
cb516787d0
Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
...
llvm-svn: 83180
2009-09-30 22:34:41 +00:00
Bob Wilson
d6896006b1
Use OutStreamer.SwitchSection instead of writing out textual section directives.
...
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.
llvm-svn: 83178
2009-09-30 22:25:37 +00:00
Bob Wilson
1cf44c8225
Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
...
to emit target-specific things at the beginning of the asm output. This
fixes a problem for PPC, where the text sections are not being kept together
as expected. The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives. The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text. With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.
llvm-svn: 83176
2009-09-30 22:06:26 +00:00
Bob Wilson
59eb323058
Fix a comment typo.
...
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Devang Patel
43ce9e3e75
Check for null MDNode element while printing comment.
...
llvm-svn: 83172
2009-09-30 21:26:51 +00:00
Bob Wilson
44b5a5a58c
Fix a comment.
...
llvm-svn: 83171
2009-09-30 21:26:13 +00:00
Bob Wilson
233aa46c87
The AsmPrinter base class contains a DwarfWriter member, so there's no need
...
for derived AsmPrinters to add another one. In some cases, fixing this
removes the need to override the doInitialization method.
llvm-svn: 83170
2009-09-30 21:24:45 +00:00
Jeffrey Yasskin
2d4f3f6704
Assert that ConstantArrays are created with correctly-typed elements.
...
llvm-svn: 83168
2009-09-30 21:08:08 +00:00
Dan Gohman
2ecc146f0c
Fix this code so that it doesn't try to iterate through a std::vector
...
while calling changeImmediateDominator, which removes elements from the
vector. This fixes PR5097.
llvm-svn: 83166
2009-09-30 20:54:16 +00:00
Reid Kleckner
4c0732ea64
Silence comparison always false warning in -Asserts mode.
...
llvm-svn: 83164
2009-09-30 20:43:07 +00:00
Jim Grosbach
b4fdc9252d
Add additional assert() to verify no extraneous use of a scavenged register.
...
llvm-svn: 83163
2009-09-30 20:35:36 +00:00
Devang Patel
24270e88cc
Print tag name for MDNodes that are used to encode debug info.
...
llvm-svn: 83160
2009-09-30 20:16:54 +00:00
Reid Kleckner
ffe2b97d7a
Fix integer overflow in instruction scheduling. This can happen if we have
...
basic blocks that are so long that their size overflows a short.
Also assert that overflow does not happen in the future, as requested by Evan.
This fixes PR4401.
llvm-svn: 83159
2009-09-30 20:15:38 +00:00
Jim Grosbach
2c211c7bfe
Clarify comment phrasing.
...
llvm-svn: 83148
2009-09-30 15:23:38 +00:00
Evan Cheng
86bd5c3ae1
Add a option which would move ld/st multiple pass before post-alloc scheduling.
...
llvm-svn: 83145
2009-09-30 08:53:01 +00:00
Evan Cheng
bb0561f2dd
Add a target hook to add pre- post-regalloc scheduling passes.
...
llvm-svn: 83144
2009-09-30 08:49:50 +00:00
Nick Lewycky
a44b8327fb
Fix compile error as debug interface changed.
...
By the way, this code is buggy. You can't keep a map<MDNode *, something>
because the MDNode may be destroyed and reused for something else.
llvm-svn: 83141
2009-09-30 04:50:26 +00:00
Jim Grosbach
d885068ad4
replace TRI->isVirtualRegister() with TargetRegisterInfo::isVirtualRegister()
...
per customary usage
llvm-svn: 83137
2009-09-30 01:47:59 +00:00
Jim Grosbach
9655673c95
When checking whether we need to reserve a register for the scavenger,
...
the size of the saved frame pointer needs to be taken into account.
llvm-svn: 83136
2009-09-30 01:43:29 +00:00
Jim Grosbach
2d057f09e8
Add "isBarrier = 1" to return instructions.
...
Patch by Sylvere Teissier.
llvm-svn: 83135
2009-09-30 01:35:11 +00:00
Jim Grosbach
5cc33f7dac
fix compiler warning
...
llvm-svn: 83132
2009-09-30 00:37:40 +00:00
Bob Wilson
48f9855607
For Darwin, emit all the text section directives together before the dwarf
...
section directives. This causes the assembler to put the text sections at
the beginning of the object file, which helps work around a limitation of the
Darwin ARM relocations. Radar 7255355.
llvm-svn: 83127
2009-09-30 00:23:42 +00:00
Devang Patel
0136a7ebec
Simplify.
...
llvm-svn: 83123
2009-09-30 00:14:40 +00:00
David Goodwin
a282690f82
Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.
...
llvm-svn: 83122
2009-09-30 00:10:16 +00:00
Mike Stump
a3bce35a07
Add a way for a frontend to generate more complex dwarf location
...
information. This allows arbitrary code involving DW_OP_plus_uconst
and DW_OP_deref. The scheme allows for easy extention to include,
any, or all of the DW_OP_ opcodes. I thought about just exposing all
of them, but, wasn't sure if people wanted the dwarf opcodes exposed
in the api. Is that a layering violation?
With this scheme, the entire existing block scheme used by llvm-gcc
can be switched over to the new scheme. I think that would be
cleaner, as then the compiler specific bits are not present in llvm
proper. Before the old code can be yanked however, similar code in
clang would have to be removed.
Next up, more testing.
llvm-svn: 83120
2009-09-30 00:08:22 +00:00
Jim Grosbach
278d0d5b3d
minor cleanup and add clarifying comment
...
llvm-svn: 83117
2009-09-29 23:17:20 +00:00
Devang Patel
c1e370a29c
Lookup handler name only when assertions are enabled.
...
llvm-svn: 83114
2009-09-29 22:05:52 +00:00
Devang Patel
39b5b72d74
Add removeMD().
...
llvm-svn: 83107
2009-09-29 20:42:25 +00:00
Devang Patel
292bcd8ca1
Only one custom meadata of each kind can be attached with an instruction.
...
llvm-svn: 83105
2009-09-29 20:30:57 +00:00
Jim Grosbach
f759d3c1c5
Additional check for regno==0
...
llvm-svn: 83103
2009-09-29 20:11:10 +00:00
Devang Patel
351585921d
Use assertion instead of early exit to catch malformed custom metadata store.
...
llvm-svn: 83102
2009-09-29 20:01:19 +00:00
Devang Patel
5dcd8e1d86
Remove unnecessary cast.
...
llvm-svn: 83100
2009-09-29 19:56:13 +00:00
Devang Patel
e5be8e79df
Remove std::string uses from DebugInfo interface.
...
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Jim Grosbach
0e6ac9047c
Simplify the tracking of virtual frame index registers. Ranges cannot overlap,
...
so a simple "current register" will suffice. Also add some additional
sanity-checking assertions to make sure things are as we expect.
llvm-svn: 83081
2009-09-29 18:23:15 +00:00
Jim Grosbach
6f6bc51d3b
Moving register scavenging to a post pass results in virtual registers in
...
the instruction we're scavenging for. The scavenger needs to know to avoid
them when analyzing register usage.
llvm-svn: 83077
2009-09-29 17:24:37 +00:00