oota-llvm.git
15 years agoDefault to the xs1b subtarget
Richard Osborne [Tue, 6 Oct 2009 15:41:52 +0000 (15:41 +0000)]
Default to the xs1b subtarget

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83380 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce and use convenience methods for getting pointer types
Duncan Sands [Tue, 6 Oct 2009 15:40:36 +0000 (15:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogrammar
Jim Grosbach [Tue, 6 Oct 2009 15:03:44 +0000 (15:03 +0000)]
grammar

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83378 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix cut-n-pasto.
Devang Patel [Tue, 6 Oct 2009 03:15:38 +0000 (03:15 +0000)]
Fix cut-n-pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83367 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate processDebugLoc() to handle requests to process debug info, before and after...
Devang Patel [Tue, 6 Oct 2009 03:04:58 +0000 (03:04 +0000)]
Update processDebugLoc() to handle requests to process debug info, before and after emitting instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83364 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate processDebugLoc() so that it can be used to process debug info before and...
Devang Patel [Tue, 6 Oct 2009 02:19:11 +0000 (02:19 +0000)]
Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code.
Devang Patel [Tue, 6 Oct 2009 02:01:32 +0000 (02:01 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83362 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd utility routine to set begin and end labels for DbgScopes.
Devang Patel [Tue, 6 Oct 2009 01:50:42 +0000 (01:50 +0000)]
Add utility routine to set begin and end labels for DbgScopes.
This will be used by processDebugLoc().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83361 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unintentional function decl.
Devang Patel [Tue, 6 Oct 2009 01:31:35 +0000 (01:31 +0000)]
Remove unintentional function decl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83356 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd utility routine to collect variable debug info. This is not yet used.
Devang Patel [Tue, 6 Oct 2009 01:26:37 +0000 (01:26 +0000)]
Add utility routine to collect variable debug info. This is not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83355 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittests
Jeffrey Yasskin [Tue, 6 Oct 2009 00:35:55 +0000 (00:35 +0000)]
Fix llvm.org/PR5116 by rolling back r60822.  This passes `make unittests
check-lit` on both x86-64 Linux and x86-32 Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83353 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet default location for the function if it is not already set.
Devang Patel [Tue, 6 Oct 2009 00:09:08 +0000 (00:09 +0000)]
Set default location for the function if it is not already set.
This code is not  yet enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83349 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExistence of a compile unit for input source file is a good indicator to check debug...
Devang Patel [Tue, 6 Oct 2009 00:03:14 +0000 (00:03 +0000)]
Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83348 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf subprogram die is not available then construct new one.
Devang Patel [Mon, 5 Oct 2009 23:59:00 +0000 (23:59 +0000)]
If subprogram die is not available then construct new one.
This can happen if debug info is processed lazily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83347 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a test for http://llvm.org/PR3043.
Jeffrey Yasskin [Mon, 5 Oct 2009 23:51:08 +0000 (23:51 +0000)]
Add a test for http://llvm.org/PR3043.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust context for the global variables that are not at file scope, e.g.
Devang Patel [Mon, 5 Oct 2009 23:40:42 +0000 (23:40 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83344 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet address while constructing DIE.
Devang Patel [Mon, 5 Oct 2009 23:22:08 +0000 (23:22 +0000)]
Set address while constructing DIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83343 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake misses a check for sbrk on NetBSD.
Edward O'Callaghan [Mon, 5 Oct 2009 23:05:32 +0000 (23:05 +0000)]
CMake misses a check for sbrk on NetBSD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83341 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend ConstantFolding to understand signed overflow variants
Evan Phoenix [Mon, 5 Oct 2009 22:53:52 +0000 (22:53 +0000)]
Extend ConstantFolding to understand signed overflow variants

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83338 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn Thumb1, the register scavenger is not always able to use an emergency
Jim Grosbach [Mon, 5 Oct 2009 22:30:23 +0000 (22:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83336 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst test commit
Evan Phoenix [Mon, 5 Oct 2009 22:29:11 +0000 (22:29 +0000)]
First test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83334 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't treat malloc calls with non-matching prototype as malloc.
Torok Edwin [Mon, 5 Oct 2009 21:15:43 +0000 (21:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNo newline at end of files.
Edward O'Callaghan [Mon, 5 Oct 2009 18:43:19 +0000 (18:43 +0000)]
No newline at end of files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83318 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGracefully handle various scopes while recording source line info.
Devang Patel [Mon, 5 Oct 2009 18:03:19 +0000 (18:03 +0000)]
Gracefully handle various scopes while recording source line info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83317 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unnnecessary LLVMContext argument in
Dan Gohman [Mon, 5 Oct 2009 16:36:26 +0000 (16:36 +0000)]
Remove an unnnecessary LLVMContext argument in
ConstantFoldLoadThroughGEPConstantExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83311 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse Use::operator= instead of Use::set, for consistency.
Dan Gohman [Mon, 5 Oct 2009 16:31:55 +0000 (16:31 +0000)]
Use Use::operator= instead of Use::set, for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83310 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove explicit enum integer values. They don't appear to be needed, and
Dan Gohman [Mon, 5 Oct 2009 15:52:08 +0000 (15:52 +0000)]
Remove explicit enum integer values. They don't appear to be needed, and
they make it less convenient to add new entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83308 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
Dan Gohman [Mon, 5 Oct 2009 15:42:08 +0000 (15:42 +0000)]
Add RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
is used in an operand which requires GR64_NOREX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83307 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a name in a comment.
Dan Gohman [Mon, 5 Oct 2009 15:23:17 +0000 (15:23 +0000)]
Fix a name in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83306 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocallgraph changes came after the 2.6 branch.
Chris Lattner [Mon, 5 Oct 2009 07:07:29 +0000 (07:07 +0000)]
callgraph changes came after the 2.6 branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostrength reduce a ton of type equality tests to check the typeid (Through
Chris Lattner [Mon, 5 Oct 2009 05:54:46 +0000 (05:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd more type predicates.
Chris Lattner [Mon, 5 Oct 2009 05:48:40 +0000 (05:48 +0000)]
add more type predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83296 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoteach the optimizer how to constant fold uadd/usub intrinsics.
Chris Lattner [Mon, 5 Oct 2009 05:26:04 +0000 (05:26 +0000)]
teach the optimizer how to constant fold uadd/usub intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83295 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify this code a bunch.
Chris Lattner [Mon, 5 Oct 2009 05:06:24 +0000 (05:06 +0000)]
simplify this code a bunch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83294 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd some helper functions.
Chris Lattner [Mon, 5 Oct 2009 05:05:57 +0000 (05:05 +0000)]
add some helper functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83293 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocode simplifications.
Chris Lattner [Mon, 5 Oct 2009 05:00:35 +0000 (05:00 +0000)]
code simplifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove implicit and paralle to a separate codegen specific section.
Evan Cheng [Mon, 5 Oct 2009 02:51:06 +0000 (02:51 +0000)]
Move implicit and paralle to a separate codegen specific section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83291 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoinstcombine shouldn't delete all null checks for mallocs.
Chris Lattner [Mon, 5 Oct 2009 02:47:47 +0000 (02:47 +0000)]
instcombine shouldn't delete all null checks for mallocs.
This fixes PR5130.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83290 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostop MachineFunctionPass from claiming that it preserves LoopDependence info,
Chris Lattner [Mon, 5 Oct 2009 02:35:05 +0000 (02:35 +0000)]
stop MachineFunctionPass from claiming that it preserves LoopDependence info,
which causes dependence info to be linked into lli.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83289 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove llvm-db: it is completely broken and if anyone wants to do a debugger,
Chris Lattner [Mon, 5 Oct 2009 02:29:51 +0000 (02:29 +0000)]
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").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83288 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd some completely unformated and probably incoherent notes about things
Chris Lattner [Mon, 5 Oct 2009 02:12:39 +0000 (02:12 +0000)]
add some completely unformated and probably incoherent notes about things
I saw while reading all the commits between the 2.5 and 2.6 release branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83287 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo away with the strange use of BitVectors in SSI, and just use normal sets. This...
Owen Anderson [Sun, 4 Oct 2009 18:49:55 +0000 (18:49 +0000)]
Do away with the strange use of BitVectors in SSI, and just use normal sets.  This makes the code much more C++/LLVM-ish.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83286 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhitespace and formatting.
Jakob Stoklund Olesen [Sun, 4 Oct 2009 18:18:39 +0000 (18:18 +0000)]
Whitespace and formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83285 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove trailing whitespace from build output.
Jakob Stoklund Olesen [Sun, 4 Oct 2009 17:54:36 +0000 (17:54 +0000)]
Remove trailing whitespace from build output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83284 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in the comment.
Owen Anderson [Sun, 4 Oct 2009 17:52:13 +0000 (17:52 +0000)]
Fix a typo in the comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83283 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSSI needs to require DT and DF transitively, since it uses them outside of its runOnF...
Owen Anderson [Sun, 4 Oct 2009 17:47:39 +0000 (17:47 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: remove .so file extension from library names when building
Oscar Fuentes [Sun, 4 Oct 2009 06:24:57 +0000 (06:24 +0000)]
CMake: remove .so file extension from library names when building
dependency info.

Patch by Peter Collingbourne!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow -inline-threshold override default threshold even if compiling to optimize...
Evan Cheng [Sun, 4 Oct 2009 06:13:54 +0000 (06:13 +0000)]
Allow -inline-threshold override default threshold even if compiling to optimize for size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83274 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOcc...
Evan Cheng [Sun, 4 Oct 2009 05:25:42 +0000 (05:25 +0000)]
Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOccurrences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83273 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRequires element types in a constant initializer to match the element types of
Nick Lewycky [Sat, 3 Oct 2009 19:30:43 +0000 (19:30 +0000)]
Requires element types in a constant initializer to match the element types of
of the constant. This reverts r6544 and r7428.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83270 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a comment to describe letters used in multiclass name suffixes.
Bob Wilson [Sat, 3 Oct 2009 04:44:16 +0000 (04:44 +0000)]
Add a comment to describe letters used in multiclass name suffixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix encoding problem for VMLS instruction.
Bob Wilson [Sat, 3 Oct 2009 04:41:21 +0000 (04:41 +0000)]
Fix encoding problem for VMLS instruction.
Thanks to Johnny Chen for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOops. Renamed remaining MachineInstrIndex references.
Lang Hames [Sat, 3 Oct 2009 04:31:31 +0000 (04:31 +0000)]
Oops. Renamed remaining MachineInstrIndex references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83255 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRenamed MachineInstrIndex to LiveIndex.
Lang Hames [Sat, 3 Oct 2009 04:21:37 +0000 (04:21 +0000)]
Renamed MachineInstrIndex to LiveIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83254 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTry to fix unit test linking on linux ...
Benjamin Kramer [Fri, 2 Oct 2009 19:52:33 +0000 (19:52 +0000)]
Try to fix unit test linking on linux ...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83252 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMingW build fixes
Benjamin Kramer [Fri, 2 Oct 2009 19:36:31 +0000 (19:36 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a use-after-free in post-ra-scheduling.
Benjamin Kramer [Fri, 2 Oct 2009 15:59:52 +0000 (15:59 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83249 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix make rule when objdir is inside srcdir.
Torok Edwin [Fri, 2 Oct 2009 09:30:03 +0000 (09:30 +0000)]
Fix make rule when objdir is inside srcdir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83243 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogetFunctionAlignment should return log2 alignment.
Evan Cheng [Fri, 2 Oct 2009 06:57:25 +0000 (06:57 +0000)]
getFunctionAlignment should return log2 alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83242 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix tests.
Evan Cheng [Fri, 2 Oct 2009 06:53:57 +0000 (06:53 +0000)]
Fix tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix test.
Evan Cheng [Fri, 2 Oct 2009 06:50:50 +0000 (06:50 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoC++ member functions must be 2 byte aligned per ABI.
Evan Cheng [Fri, 2 Oct 2009 06:07:47 +0000 (06:07 +0000)]
C++ member functions must be 2 byte aligned per ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83239 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot about ARM::tPUSH. It also has a new writeback operand.
Evan Cheng [Fri, 2 Oct 2009 05:03:07 +0000 (05:03 +0000)]
Forgot about ARM::tPUSH. It also has a new writeback operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83237 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove load / store multiple before post-alloc scheduling.
Evan Cheng [Fri, 2 Oct 2009 04:57:15 +0000 (04:57 +0000)]
Move load / store multiple before post-alloc scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest case for aligned attribute on function declaration.
Evan Cheng [Fri, 2 Oct 2009 04:45:37 +0000 (04:45 +0000)]
Test case for aligned attribute on function declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83234 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAll callee-saved registers are live-out of a return block.
David Goodwin [Thu, 1 Oct 2009 23:28:47 +0000 (23:28 +0000)]
All callee-saved registers are live-out of a return block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83223 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove neonfp attribute and instead set default based on CPU string. Add -arm-use...
David Goodwin [Thu, 1 Oct 2009 22:19:57 +0000 (22:19 +0000)]
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83218 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpand api out in the usual inserter way, though, I do have a
Mike Stump [Thu, 1 Oct 2009 22:08:58 +0000 (22:08 +0000)]
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?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83216 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRestore the -post-RA-scheduler flag as an override for the target specification....
David Goodwin [Thu, 1 Oct 2009 21:46:35 +0000 (21:46 +0000)]
Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83215 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoARM::tPOP and tPOP_RET each has an extra writeback operand now.
Evan Cheng [Thu, 1 Oct 2009 20:54:53 +0000 (20:54 +0000)]
ARM::tPOP and tPOP_RET each has an extra writeback operand now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83214 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove trailing whitespace
Jim Grosbach [Thu, 1 Oct 2009 20:45:06 +0000 (20:45 +0000)]
remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support to extract lexical scope information from DebugLoc attached with an machi...
Devang Patel [Thu, 1 Oct 2009 20:31:14 +0000 (20:31 +0000)]
Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
This is not yet enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83210 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse MachineFrameInfo.getPristineRegs() to determine which callee-saved registers...
David Goodwin [Thu, 1 Oct 2009 19:45:32 +0000 (19:45 +0000)]
Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83208 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago Record first and last instruction of a scope in DbgScope.
Devang Patel [Thu, 1 Oct 2009 18:25:23 +0000 (18:25 +0000)]
 Record first and last instruction of a scope in DbgScope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83207 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use identifiers that start with an underscore followed
Dan Gohman [Thu, 1 Oct 2009 17:39:52 +0000 (17:39 +0000)]
Don't use identifiers that start with an underscore followed
by a capital letter, which invokes undefined behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83206 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t...
Douglas Gregor [Thu, 1 Oct 2009 17:25:36 +0000 (17:25 +0000)]
Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83203 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoObserve hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
Evan Cheng [Thu, 1 Oct 2009 08:26:23 +0000 (08:26 +0000)]
Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
operands of instructions with these properties while breaking anti-dep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
Evan Cheng [Thu, 1 Oct 2009 08:22:27 +0000 (08:22 +0000)]
Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
ld / st pairs, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83197 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
Evan Cheng [Thu, 1 Oct 2009 08:21:18 +0000 (08:21 +0000)]
Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
set, these flags indicate the instructions source / def operands have special
register allocation requirement that are not captured in their register classes.
Post-allocation passes (e.g. post-alloc scheduler) should not change their
allocations. e.g. ARM::LDRD require the two definitions to be allocated
even / odd register pair.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove GVNPRE.cpp from the CMake makefile
Douglas Gregor [Thu, 1 Oct 2009 05:30:05 +0000 (05:30 +0000)]
Remove GVNPRE.cpp from the CMake makefile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83194 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove the GVNPRE pass. It has been subsumed by the GVN pass.
Chris Lattner [Thu, 1 Oct 2009 02:18:36 +0000 (02:18 +0000)]
remove the GVNPRE pass.  It has been subsumed by the GVN pass.
Ok'd by Owen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate ARM JIT emitter to account for ld/st multiple changes.
Evan Cheng [Thu, 1 Oct 2009 01:39:21 +0000 (01:39 +0000)]
Update ARM JIT emitter to account for ld/st multiple changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange ld/st multiples to explicitly model the writeback to base register. This fixes...
Evan Cheng [Thu, 1 Oct 2009 01:33:39 +0000 (01:33 +0000)]
Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83191 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another MDNode into DebugLocTuple. This will be used to keep track of inlined...
Devang Patel [Thu, 1 Oct 2009 01:15:28 +0000 (01:15 +0000)]
Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf location info is attached with an instruction then keep track of alloca slots...
Devang Patel [Thu, 1 Oct 2009 01:03:26 +0000 (01:03 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse MachineInstr as an processDebugLoc() argument.
Devang Patel [Wed, 30 Sep 2009 23:12:50 +0000 (23:12 +0000)]
Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83183 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse MDNode * directly as an RecordSourceLine() argument.
Devang Patel [Wed, 30 Sep 2009 22:51:28 +0000 (22:51 +0000)]
Use MDNode * directly as an RecordSourceLine() argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83182 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code.
Devang Patel [Wed, 30 Sep 2009 22:43:52 +0000 (22:43 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
Devang Patel [Wed, 30 Sep 2009 22:34:41 +0000 (22:34 +0000)]
Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse OutStreamer.SwitchSection instead of writing out textual section directives.
Bob Wilson [Wed, 30 Sep 2009 22:25:37 +0000 (22:25 +0000)]
Use OutStreamer.SwitchSection instead of writing out textual section directives.
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83178 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
Bob Wilson [Wed, 30 Sep 2009 22:06:26 +0000 (22:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a comment typo.
Bob Wilson [Wed, 30 Sep 2009 21:44:42 +0000 (21:44 +0000)]
Fix a comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83174 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck for null MDNode element while printing comment.
Devang Patel [Wed, 30 Sep 2009 21:26:51 +0000 (21:26 +0000)]
Check for null MDNode element while printing comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83172 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a comment.
Bob Wilson [Wed, 30 Sep 2009 21:26:13 +0000 (21:26 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83171 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe AsmPrinter base class contains a DwarfWriter member, so there's no need
Bob Wilson [Wed, 30 Sep 2009 21:24:45 +0000 (21:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83170 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAssert that ConstantArrays are created with correctly-typed elements.
Jeffrey Yasskin [Wed, 30 Sep 2009 21:08:08 +0000 (21:08 +0000)]
Assert that ConstantArrays are created with correctly-typed elements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83168 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix this code so that it doesn't try to iterate through a std::vector
Dan Gohman [Wed, 30 Sep 2009 20:54:16 +0000 (20:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83166 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSilence comparison always false warning in -Asserts mode.
Reid Kleckner [Wed, 30 Sep 2009 20:43:07 +0000 (20:43 +0000)]
Silence comparison always false warning in -Asserts mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83164 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd additional assert() to verify no extraneous use of a scavenged register.
Jim Grosbach [Wed, 30 Sep 2009 20:35:36 +0000 (20:35 +0000)]
Add additional assert() to verify no extraneous use of a scavenged register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83163 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint tag name for MDNodes that are used to encode debug info.
Devang Patel [Wed, 30 Sep 2009 20:16:54 +0000 (20:16 +0000)]
Print tag name for MDNodes that are used to encode debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83160 91177308-0d34-0410-b5e6-96231b3b80d8