David Goodwin [Thu, 24 Sep 2009 20:22:50 +0000 (20:22 +0000)]
Make the end-of-itinerary mark explicit. Some cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82709
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 24 Sep 2009 20:20:08 +0000 (20:20 +0000)]
Add nounwind to this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 20:15:51 +0000 (20:15 +0000)]
tidy up, fix a memory leak in Regex::isValid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82707
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 24 Sep 2009 18:38:21 +0000 (18:38 +0000)]
Clarify that llvm attaches C language semantics to
functions with names that match the C library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82701
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 24 Sep 2009 18:33:42 +0000 (18:33 +0000)]
Constant propagating byval pointer is safe if function is readonly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82700
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 24 Sep 2009 17:47:49 +0000 (17:47 +0000)]
Auto-upgrade malloc instructions to malloc calls.
Reviewed by Devang Patel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 24 Sep 2009 16:42:27 +0000 (16:42 +0000)]
Fix a hypothetical problem for targets with StackGrowsUp and a non-zero
LocalAreaOffset. (We don't have any of those right now.)
PEI::calculateFrameObjectOffsets includes the absolute value of the
LocalAreaOffset in the cumulative offset value used to calculate the
stack frame size. It then adds the raw value of the LocalAreaOffset
to the stack size. For a StackGrowsDown target, that raw value is negative
and has the effect of cancelling out the absolute value that was added
earlier, but that obviously won't work for a StackGrowsUp target. Change
to subtract the absolute value of the LocalAreaOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82693
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 24 Sep 2009 16:19:11 +0000 (16:19 +0000)]
Move parent assertion check before metadata deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82692
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 24 Sep 2009 09:47:18 +0000 (09:47 +0000)]
Don't constant propagate byval pointers, since they are not really pointers, but
rather structs passed by value.
This fixes PR5038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82689
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 24 Sep 2009 06:23:57 +0000 (06:23 +0000)]
Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82685
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 05:44:53 +0000 (05:44 +0000)]
unconditionally compute MMI even if the target doesn't support EH or Debug info, because the target may use it for other things, this fixes PR5036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Sep 2009 05:38:36 +0000 (05:38 +0000)]
reapply r82348 with a fix, thanks Jeffrey.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82683
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Sep 2009 02:27:09 +0000 (02:27 +0000)]
Fix PR5024 with a big hammer: disable the double-def assertion in the scavenger.
LiveVariables add implicit kills to correctly track partial register kills. This works well enough and is fairly accurate. But coalescer can make it impossible to maintain these markers. e.g.
BL <ga:sss1>, %R0<kill,undef>, %S0<kill>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def>, ...
...
%reg1031<def> = FLDS <cp#1>, 0, 14, %reg0, Mem:LD4[ConstantPool]
...
%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>
When reg1031 and S0 are coalesced, the copy (FCPYS) will be eliminated the the implicit-kill of D0 is lost. In this case it's possible to move the marker to the FLDS. But in many cases, this is not possible. Suppose
%reg1031<def> = FOO <cp#1>, %D0<imp-def>
...
%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>
When FCPYS goes away, the definition of S0 is the "FOO" instruction. However, transferring the D0 implicit-kill to FOO doesn't work since it is the def of D0 itself. We need to fix this in another time by introducing a "kill" pseudo instruction to track liveness.
Disabling the assertion is not ideal, but machine verifier is doing that job now. It's important to know double-def is not a miscomputation since it means a register should be free but it's not tracked as free. It's a performance issue instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82677
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Sep 2009 02:15:22 +0000 (02:15 +0000)]
Clean up LiveVariables and change how it deals with partial updates and kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82676
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 24 Sep 2009 01:14:07 +0000 (01:14 +0000)]
Roll back r82348, which introduced an infinite loop in ParseCStringVector() that
a trivial unittest would have caught. This revision also adds the trivial
unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82675
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 23 Sep 2009 22:05:24 +0000 (22:05 +0000)]
A minor improvment in accuracy to inline cost
computation, and some cosmetics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82660
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 23 Sep 2009 21:46:36 +0000 (21:46 +0000)]
Disable test; what it's testing for is wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82658
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 23 Sep 2009 21:38:08 +0000 (21:38 +0000)]
Checkpoint NEON scheduling itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 21:07:02 +0000 (21:07 +0000)]
Use getStoreSize() instead of getStoreSizeInBits()/8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82656
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 21:06:36 +0000 (21:06 +0000)]
Spruce up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 21:02:20 +0000 (21:02 +0000)]
Rename several variables from EVT to more descriptive names, now that EVT
is also the name of their type, as declarations like "EVT EVT" look
really odd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82654
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 20:59:10 +0000 (20:59 +0000)]
Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82653
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 23 Sep 2009 20:57:55 +0000 (20:57 +0000)]
Fix verification of explicit operands.
The machine code verifier did not check for explicit operands correctly. It
used MachineInstr::getNumExplicitOperands, but that method may cheat and use
the declared count in the TargetInstrDesc.
Now we check the explicit operands one at a time in visitMachineOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82652
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 23 Sep 2009 20:57:02 +0000 (20:57 +0000)]
Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
default implementation. Update comment on the default version, which made it
sound like most targets override it. Currently only X86 and SystemZ override
this method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 20:40:16 +0000 (20:40 +0000)]
Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82648
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 23 Sep 2009 20:33:51 +0000 (20:33 +0000)]
Delete attached metadata when an instruction is deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82647
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 23 Sep 2009 19:04:09 +0000 (19:04 +0000)]
ARM does not support offset folding (yet). Disable it for now.
This fixes PR5031. Unfortunately, there is no small testcase :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82643
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 23 Sep 2009 18:53:19 +0000 (18:53 +0000)]
Edit a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82641
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 23 Sep 2009 18:32:25 +0000 (18:32 +0000)]
Do not leave behind metadata while cloning an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82638
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 23 Sep 2009 18:20:27 +0000 (18:20 +0000)]
Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82637
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 23 Sep 2009 17:20:43 +0000 (17:20 +0000)]
s/*Location/*DebugLocation/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82635
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Wed, 23 Sep 2009 17:05:42 +0000 (17:05 +0000)]
PR4047: Permit configure --enable-targets=host,cpp for example. "host" has the
same effect that "host-only" used to have, but can be combined with other
targets. host-only is still available as a synonym but no longer documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82634
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 23 Sep 2009 16:35:25 +0000 (16:35 +0000)]
Fix bug in kill flag updating for post-register-allocation scheduling. When the kill flag of a superreg needs to be cleared because there are one or more subregs live, we instead add implicit-defs of those subregs and leave the kill flag on the superreg. This allows us to end the live-range of the superreg without ending the live-ranges of the subregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82629
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 23 Sep 2009 11:48:57 +0000 (11:48 +0000)]
Fix a struct/class mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82622
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 23 Sep 2009 06:53:51 +0000 (06:53 +0000)]
Make the type traits for a const pointer defer to those for a unqualified
pointer, instead of providing independent values modelled on the default
implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82620
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 23 Sep 2009 06:28:31 +0000 (06:28 +0000)]
Fix PR5024. LiveVariables physical register defs should *commit* only after all
of the defs are processed.
Also fix a implicit_def propagation bug: a implicit_def of a physical register
should be applied to uses of the sub-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82616
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 23 Sep 2009 05:23:19 +0000 (05:23 +0000)]
Fix a obvious logic error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82610
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 23 Sep 2009 02:46:12 +0000 (02:46 +0000)]
pretty mechanical changes to match coding guidelines (blessed by sabre on IRC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82603
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Sep 2009 02:03:49 +0000 (02:03 +0000)]
errorstr can be null, don't unconditionally set it. Only report that
"the jit has not been linked in" if the interpreter failed.
This fixes a unit test failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Sep 2009 01:46:04 +0000 (01:46 +0000)]
Make EngineBuilder return more error codes, by KS Sreeram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82600
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 01:33:16 +0000 (01:33 +0000)]
Give MachineMemOperand an operator<<, factoring out code from
two different places for printing MachineMemOperands.
Drop the virtual from Value::dump and instead give Value a
protected virtual hook that can be overridden by subclasses
to implement custom printing. This lets printing be more
consistent, and simplifies printing of PseudoSourceValue
values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82599
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Sep 2009 01:29:41 +0000 (01:29 +0000)]
Fix X86's unfoldMemoryOperand to properly handle MachineMemOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82597
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 23 Sep 2009 00:13:30 +0000 (00:13 +0000)]
This is overly constraining with respect to clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82591
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Tue, 22 Sep 2009 21:15:19 +0000 (21:15 +0000)]
Add examples for Kaleidoscope chapters 2 through 6.
Conflicts:
examples/Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82574
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Tue, 22 Sep 2009 21:15:00 +0000 (21:15 +0000)]
Rename Kaleidoscope to show that it's for Chapter 7 of the tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82573
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Tue, 22 Sep 2009 21:14:49 +0000 (21:14 +0000)]
Sync c++ kaleidoscope tutorial with test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82572
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 22 Sep 2009 20:56:31 +0000 (20:56 +0000)]
Add SetLocation() to allow IRBuilder user to set location info for an instruction already created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82570
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 22 Sep 2009 20:54:13 +0000 (20:54 +0000)]
Check exisiting dbg MDKind first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82568
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 22 Sep 2009 18:50:03 +0000 (18:50 +0000)]
No need to verify that malloc's return type is i8*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82561
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Tue, 22 Sep 2009 16:47:52 +0000 (16:47 +0000)]
Use early returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82554
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 16:33:42 +0000 (16:33 +0000)]
Revert "Don't allow formatted_ostream to be unbuffered, even if its underlying
buffer", while we work out a solution.
Dan convinced me that making debugging annoying for him is worse than 10x being
slower for me. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82553
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 16:10:35 +0000 (16:10 +0000)]
... missed hiding a variable for MSVC only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82552
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 15:58:35 +0000 (15:58 +0000)]
Hide MSVC specific CRT interaction behind _MSC_VER.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82551
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 22 Sep 2009 15:40:32 +0000 (15:40 +0000)]
Remove the GetProcessId() call from Win32/Program.inc, take 2.
GetProcessId() was introduced only in Windows XP, and we want to support earlier
versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82548
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 10:30:34 +0000 (10:30 +0000)]
Fix commento.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82544
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 09:50:38 +0000 (09:50 +0000)]
lit: When executing shell scripts internally, don't allow piped stderr on any
commands except the last one, instead redirect the stderr to a temporary
file. This sidesteps a potential deadlocking issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82538
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 09:50:28 +0000 (09:50 +0000)]
Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.
Also, tweak the 'lit' test runner to set this variable unconditionally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82537
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 22 Sep 2009 08:47:59 +0000 (08:47 +0000)]
Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82536
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 22 Sep 2009 08:34:46 +0000 (08:34 +0000)]
Fix PR5024. LiveVariables::FindLastPartialDef should return a set of sub-registers that were defined by the last partial def, not just a single sub-register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82535
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 07:38:44 +0000 (07:38 +0000)]
Initial support for running LLVM tests from cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82534
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 07:38:33 +0000 (07:38 +0000)]
Generate lit.site.cfg from a .in file, as clang does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82533
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 07:38:23 +0000 (07:38 +0000)]
Use Compiler.h macro instead of __attribute__.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82532
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 06:09:37 +0000 (06:09 +0000)]
CMake: Fix definition of LTDL_SHLIB_EXT for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82530
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 06:09:31 +0000 (06:09 +0000)]
Fix llvm-config --src-root and --obj-root for CMake builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82529
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 06:09:22 +0000 (06:09 +0000)]
llvm-config: Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82528
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 06:09:13 +0000 (06:09 +0000)]
Actually use the arguments with the resolved executable path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82527
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 04:44:56 +0000 (04:44 +0000)]
Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
ExecuteAndWait.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82522
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 04:44:37 +0000 (04:44 +0000)]
lit: Don't use close_fds=True on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82521
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 04:44:26 +0000 (04:44 +0000)]
lit: When executing commands internally, perform PATH resolution ourselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82520
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 03:34:53 +0000 (03:34 +0000)]
Switch FoldingSet::AddString to StringRef based API.
- This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82517
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 03:34:40 +0000 (03:34 +0000)]
Workaround what I believe is an MSVC bug where it emits a definition for a
static const class member into each translation unit, with external linkage???
- If someone understands this issue better, please clue me in, I haven't
consulted the standard yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82516
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 02:03:18 +0000 (02:03 +0000)]
Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82507
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 22 Sep 2009 02:02:33 +0000 (02:02 +0000)]
Add a TrackingVH value handle.
This is designed for tracking a value even when it might move (like WeakVH), but it is an error to delete the referenced value (unlike WeakVH0. TrackingVH is templated like AssertingVH on the tracked Value subclass, it is an error to RAUW a tracked value to an incompatible type.
For implementation reasons the latter error is only diagnosed on accesses to a mis-RAUWed TrackingVH, because we don't want a virtual interface in a templated class.
The former error is also only diagnosed on access, so that clients are allowed to delete a tracked value, as long as they don't use it. This makes it easier for the client to reason about destruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82506
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 22 Sep 2009 01:48:19 +0000 (01:48 +0000)]
Fix a pasto. Also simplify for Bill's benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82505
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 22 Sep 2009 00:29:40 +0000 (00:29 +0000)]
Minor bug fix. LowerSubregs should translate
%S0<def> = EXTRACT_SUBREG %Q0<kill>, 1
to
%S0<def> = IMPLICIT_DEF %Q0<imp-use,kill>
Implicit_def does not *read* any register so the operand should be marked "implicit". The missing "implicit" marker on the operand is wrong, but it doesn't actually break anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82503
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 22:39:35 +0000 (22:39 +0000)]
Fix PR5023: The instruction form of DominatorTree::dominates did not
take into consideration that the result of an invoke is only valid in
the normal dest, not the unwind dest. This caused 'PHINode::hasConstantValue'
to return true in an invalid situation, causing mem2reg to delete a phi that
was actually needed. This caused a crash building 483.xalancbmk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 22:30:50 +0000 (22:30 +0000)]
move DominatorTree::dominates for instructions out of line,
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82490
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 22:27:34 +0000 (22:27 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 22:26:02 +0000 (22:26 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82488
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 21 Sep 2009 21:12:25 +0000 (21:12 +0000)]
Clean up spill weight computation. Also some changes to give loop induction
variable increment / decrement slighter high priority.
This has major impact on some micro-benchmarks. On MultiSource/Applications
and spec tests, it's a minor win. It also reduce 256.bzip instruction count
by 8%, 55 on 164.gzip on i386 / Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82485
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Mon, 21 Sep 2009 20:52:17 +0000 (20:52 +0000)]
Add Cortex-A8 VFP model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82483
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 19:47:04 +0000 (19:47 +0000)]
Change MachineMemOperand's alignment value to be the alignment of
the base pointer, without the offset. This matches MemSDNode's
new alignment behavior, and holds more interesting information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82473
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 18:32:20 +0000 (18:32 +0000)]
Add a comment mentioning the rdar number associated with this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82471
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 18:30:38 +0000 (18:30 +0000)]
Add support for rematerializing FsFLD0SS and FsFLD0SD as constant-pool
loads in order to reduce register pressure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82470
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 18:03:22 +0000 (18:03 +0000)]
Recognize SSE min and max opportunities in even more cases.
And fix a bug with the behavior of min/max instructions formed from
fcmp uge comparisons.
Also, use FiniteOnlyFPMath() for this code instead of UnsafeFPMath,
as it is more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82466
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 17:58:09 +0000 (17:58 +0000)]
Fix the offset values for these memoperands. For frame objects, the
PseudoSourceValue already effectively represents the offset from the
frame base, so the actual offset should not be added to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 17:55:47 +0000 (17:55 +0000)]
big endian systems shift by bits too, hopefully this will fix the ppc
bootstrap problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82464
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 17:54:42 +0000 (17:54 +0000)]
Nick pointed out that DominanceFrontier and DominanceTree are preserved
by setPreservesCFG().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82463
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 17:53:35 +0000 (17:53 +0000)]
Remove the special-case for constants in PHI nodes; it's not really
helpful, and it didn't correctly handle the case of constants input
to PHIs for backedges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82462
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 17:24:04 +0000 (17:24 +0000)]
fix PR5016, a crash I introduced in GVN handing first class
arrays and structs, which cannot be bitcast to integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82460
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Mon, 21 Sep 2009 15:53:44 +0000 (15:53 +0000)]
Use raw_ostream::indent instead of passing strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82456
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Sep 2009 15:18:33 +0000 (15:18 +0000)]
Fix this assertion string to mention subreg_to_reg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82455
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 21 Sep 2009 14:11:56 +0000 (14:11 +0000)]
initialize SymbolsCanStartWithDigit to false by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82454
91177308-0d34-0410-b5e6-
96231b3b80d8
Xerxes Ranby [Mon, 21 Sep 2009 08:08:29 +0000 (08:08 +0000)]
Update cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82449
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 21 Sep 2009 07:19:08 +0000 (07:19 +0000)]
Verify that phi instructions refer to MBBs in the CFG.
The machine code verifier no longer tolerates phi instructions with noop
operands. All MBBs on a phi instruction must be in the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:48:08 +0000 (06:48 +0000)]
enable non-local analysis and PRE of large store -> little load.
This doesn't kick in too much because of phi translation issues,
but this can be resolved in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:30:24 +0000 (06:30 +0000)]
convert an std::pair to an explicit struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:24:16 +0000 (06:24 +0000)]
move some functions, add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:22:46 +0000 (06:22 +0000)]
split HandleLoadFromClobberingStore in two pieces: one that does the
analysis, one that does the xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Sep 2009 06:04:07 +0000 (06:04 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82442
91177308-0d34-0410-b5e6-
96231b3b80d8