Anton Korobeynikov [Mon, 7 Dec 2009 02:28:26 +0000 (02:28 +0000)]
Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90741
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 7 Dec 2009 02:28:10 +0000 (02:28 +0000)]
Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90740
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:53 +0000 (02:27 +0000)]
Initial codegen support for MSP430 ISRs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90739
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:35 +0000 (02:27 +0000)]
Add MSP430 interrupt calling conv. No functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90738
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:08 +0000 (02:27 +0000)]
Add ability to select hw multiplier mode and select appropriate libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90737
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 7 Dec 2009 00:27:35 +0000 (00:27 +0000)]
Fix typos. Thanks to John Tytgat for noticing it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90728
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 6 Dec 2009 22:39:50 +0000 (22:39 +0000)]
Dynamic stack realignment use of sp register as source/dest register
in "bic sp, sp, #15" leads to unpredicatble behaviour in Thumb2 mode.
Emit the following code instead:
mov r4, sp
bic r4, r4, #15
mov sp, r4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 17:17:23 +0000 (17:17 +0000)]
fix PR5698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 16:58:41 +0000 (16:58 +0000)]
remove extraneous comma clang warns about
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 05:29:56 +0000 (05:29 +0000)]
constant fold loads from memcpy's from global constants. This is important
because clang lowers nontrivial automatic struct/array inits to memcpy from
a global array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90698
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 04:54:31 +0000 (04:54 +0000)]
add support for forwarding mem intrinsic values to non-local loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90697
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 04:16:05 +0000 (04:16 +0000)]
gvn is optimizing this better now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 01:57:02 +0000 (01:57 +0000)]
Handle forwarding local memsets to loads. For example, we optimize this:
short x(short *A) {
memset(A, 1, sizeof(*A)*100);
return A[42];
}
to 'return 257' instead of doing the load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 01:56:22 +0000 (01:56 +0000)]
Add helper methods for forming shift operations with a constant
shift amount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 01:47:24 +0000 (01:47 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90691
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 6 Dec 2009 00:06:33 +0000 (00:06 +0000)]
CheckAtomic.cmake: Put all C++ code inside CHECK_CXX_SOURCE_COMPILES.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90685
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 5 Dec 2009 23:19:33 +0000 (23:19 +0000)]
Fix for atomic intrinsics detection when using MSVC.
Patch by Michael Beck!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90683
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 17:56:26 +0000 (17:56 +0000)]
Remove old DBG_LABEL code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90669
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 17:51:33 +0000 (17:51 +0000)]
Remove the unused DisableLegalizeTypes option and related code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90668
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Dec 2009 07:59:04 +0000 (07:59 +0000)]
Calling InvalidateEntry during the refinement was breaking the bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90656
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Dec 2009 07:46:49 +0000 (07:46 +0000)]
Final cleanups:
- Privatize a typedef.
- Call the InvalidateEntry when refining a type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90655
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Dec 2009 07:30:23 +0000 (07:30 +0000)]
Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90653
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 5 Dec 2009 06:37:52 +0000 (06:37 +0000)]
Document that memory use intrinsics may also return Def results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90651
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 5 Dec 2009 06:37:24 +0000 (06:37 +0000)]
Fix indentation in switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90650
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 5 Dec 2009 05:00:00 +0000 (05:00 +0000)]
Generalize this optimization to work on equality comparisons between any two
integers that are constant except for a single bit (the same n-th bit in each).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90646
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 5 Dec 2009 02:46:03 +0000 (02:46 +0000)]
More updates to objectsize intrinsic docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 02:00:34 +0000 (02:00 +0000)]
Don't print a space before the : between the file name and line number.
And separate the directory and file name with a '/'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90641
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Dec 2009 01:46:01 +0000 (01:46 +0000)]
Inline methods which are called only once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90640
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 5 Dec 2009 01:43:33 +0000 (01:43 +0000)]
Refactor some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90639
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 01:42:34 +0000 (01:42 +0000)]
Print newlines after printing labels for debug info, so that the output
isn't cluttered with things like "Llabel47:Llabel48: movq (%rsi), %xmm3"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90638
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 01:29:04 +0000 (01:29 +0000)]
Don't blindly set the debug location for PHI node copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90637
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 01:27:58 +0000 (01:27 +0000)]
Make TargetSelectInstruction protected and called from FastISel.cpp
instead of SelectionDAGISel.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90636
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:44:40 +0000 (00:44 +0000)]
Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90634
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:32:59 +0000 (00:32 +0000)]
Simplify this code: don't call AnalyzeBranch before doing simpler checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:27:08 +0000 (00:27 +0000)]
The debug information for an LLVM Instruction applies to that Instruction
and that Instruction only. Implement this by setting the "current debug position"
back to Unknown after processing each instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90632
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:23:29 +0000 (00:23 +0000)]
Fix this code to use DIScope instead of DICompileUnit, as in r90181.
Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90631
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:20:51 +0000 (00:20 +0000)]
Don't print the debug directory; it's often long and uninteresting. Omit
the column number if it is not known. Handle the case of a missing filename
better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90630
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:05:43 +0000 (00:05 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90628
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Sat, 5 Dec 2009 00:03:24 +0000 (00:03 +0000)]
Remove an unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 5 Dec 2009 00:02:37 +0000 (00:02 +0000)]
Remove now-redundant llvm-as invocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90626
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 4 Dec 2009 23:55:07 +0000 (23:55 +0000)]
Remove an unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90625
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Dec 2009 23:29:57 +0000 (23:29 +0000)]
Add testcase for PR4262.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90623
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2009 23:19:55 +0000 (23:19 +0000)]
Print a space between the comment character and the text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90621
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Dec 2009 23:16:56 +0000 (23:16 +0000)]
Temporarily revert r72620 because r72619 was reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90619
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 4 Dec 2009 23:10:24 +0000 (23:10 +0000)]
In TAG_subrange_type, uppder bound is zero indexed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90617
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 4 Dec 2009 23:08:02 +0000 (23:08 +0000)]
Fix a bad merge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90616
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 4 Dec 2009 23:00:50 +0000 (23:00 +0000)]
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
can return a MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90615
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 4 Dec 2009 22:46:47 +0000 (22:46 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90613
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 4 Dec 2009 22:46:04 +0000 (22:46 +0000)]
Use new interfaces to print spill size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90611
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 4 Dec 2009 22:38:46 +0000 (22:38 +0000)]
Have hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90608
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 4 Dec 2009 21:57:37 +0000 (21:57 +0000)]
Fix up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90603
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 4 Dec 2009 21:51:35 +0000 (21:51 +0000)]
Fix 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90601
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 4 Dec 2009 21:41:24 +0000 (21:41 +0000)]
OptParser: Emit HelpText field for option groups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90599
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 4 Dec 2009 21:03:02 +0000 (21:03 +0000)]
Some code cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90588
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 4 Dec 2009 20:07:10 +0000 (20:07 +0000)]
Avoid creating a metadata slot for all metadata that contains an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90581
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Dec 2009 19:09:10 +0000 (19:09 +0000)]
Handle recursive PHI's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90575
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 4 Dec 2009 18:29:23 +0000 (18:29 +0000)]
Fix crasher when N->getElement(n) is NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90572
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Dec 2009 09:42:45 +0000 (09:42 +0000)]
Add a pre-regalloc tail duplication pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90567
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Dec 2009 09:23:37 +0000 (09:23 +0000)]
Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90566
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 4 Dec 2009 08:42:17 +0000 (08:42 +0000)]
Add note about a subtle bug in this code. Does not effect the main
architectures that LLVM targets, because they don't use this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90564
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 4 Dec 2009 08:17:07 +0000 (08:17 +0000)]
Fix typo and add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90557
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Fri, 4 Dec 2009 06:58:24 +0000 (06:58 +0000)]
Added debug output for inherited passes that are invalidated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90553
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 4 Dec 2009 06:38:45 +0000 (06:38 +0000)]
Forward -m32/-m64 to the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90548
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 4 Dec 2009 06:38:28 +0000 (06:38 +0000)]
Support -march/-mtune/-mcpu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Dec 2009 06:29:29 +0000 (06:29 +0000)]
Fix PR5551 by not ignoring the top level constantexpr when
folding a load from constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90545
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Dec 2009 04:15:36 +0000 (04:15 +0000)]
add to cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90539
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Dec 2009 02:12:12 +0000 (02:12 +0000)]
Small and carefully crafted testcase showing a miscompilation by GVN
that I'm working on. This is manifesting as a miscompile of 255.vortex
on some targets. No check lines yet because it fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90520
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Dec 2009 02:10:16 +0000 (02:10 +0000)]
add the start of a class used to handle phi translation in memdep and
gvn (this is just a skeleton so far). This will ultimately be used
to fix a nasty miscompilation with GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90518
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 4 Dec 2009 01:53:15 +0000 (01:53 +0000)]
Create yet another helper for Invoke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90514
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 4 Dec 2009 01:35:02 +0000 (01:35 +0000)]
Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90512
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 4 Dec 2009 01:33:04 +0000 (01:33 +0000)]
Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90511
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 4 Dec 2009 01:26:26 +0000 (01:26 +0000)]
Add some helpers for Invoke to mirror CreateCall helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90508
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 4 Dec 2009 01:03:32 +0000 (01:03 +0000)]
add an assert to make it really clear what this is doing. Return singularval as
a compile time perf optimization to avoid a load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90507
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 4 Dec 2009 00:16:04 +0000 (00:16 +0000)]
Also attempt trivial coalescing for live intervals that end in a copy.
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch takes care of a few more cases that r90163 missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90502
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 4 Dec 2009 00:09:05 +0000 (00:09 +0000)]
- If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
- When reaching value is replaced with another, update the cache as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90501
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 3 Dec 2009 23:46:57 +0000 (23:46 +0000)]
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90498
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 3 Dec 2009 23:40:58 +0000 (23:40 +0000)]
Add ParseInlineMetadata() which can parses metadata that refers to an instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90497
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 3 Dec 2009 21:55:01 +0000 (21:55 +0000)]
remove out of date FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90490
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Dec 2009 21:51:55 +0000 (21:51 +0000)]
Handle undef values properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90489
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Dec 2009 21:50:58 +0000 (21:50 +0000)]
Watch out for PHI instruction with no source operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90488
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 3 Dec 2009 21:47:07 +0000 (21:47 +0000)]
Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90487
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 3 Dec 2009 21:37:32 +0000 (21:37 +0000)]
Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
Pointed out by Javier Martinez (who also provided a patch). Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc. Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90482
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 3 Dec 2009 20:49:10 +0000 (20:49 +0000)]
Clean up some loop logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90481
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 3 Dec 2009 19:11:07 +0000 (19:11 +0000)]
Add support to emit debug info for virtual functions and virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90474
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 3 Dec 2009 19:03:18 +0000 (19:03 +0000)]
Print a newline after the Args: line so that unrelated errs() output doesn't
end up on the same line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90473
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 3 Dec 2009 13:23:03 +0000 (13:23 +0000)]
Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90454
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Thu, 3 Dec 2009 12:55:57 +0000 (12:55 +0000)]
Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90451
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Thu, 3 Dec 2009 12:41:14 +0000 (12:41 +0000)]
Do not create negative edge weights in ProfileEstimator.
Use integer values for weights to prevent rounding errors.
Make ProfileEstimator more robust in general CFGs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90449
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 3 Dec 2009 11:12:42 +0000 (11:12 +0000)]
Add an implementation of the delta debugging algorithm.
- This is a pretty slow / memory intensive implementation, and I will likely
change it to an iterative model, but it works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90447
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Thu, 3 Dec 2009 11:00:37 +0000 (11:00 +0000)]
Use ProfileInfo-API in ProfileInfo Loader and do more assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90446
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Thu, 3 Dec 2009 09:30:12 +0000 (09:30 +0000)]
Converted ProfileInfo to template, added more API for ProfileInfo-preserving.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90445
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Dec 2009 08:43:53 +0000 (08:43 +0000)]
Teach tail duplication to update SSA form. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90432
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Dec 2009 07:43:46 +0000 (07:43 +0000)]
expand note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90429
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Dec 2009 07:41:54 +0000 (07:41 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90428
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 3 Dec 2009 07:11:29 +0000 (07:11 +0000)]
Don't pull vector sext through both hands of a logical operation, since doing so prevents the fusion of vector sext and setcc into vsetcc.
Add a testcase for the above transformation.
Fix a bogus use of APInt noticed while tracking this down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 3 Dec 2009 06:58:32 +0000 (06:58 +0000)]
fix a build problem with VC++, PR5664, patch by Alp Toker!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90419
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 3 Dec 2009 06:40:55 +0000 (06:40 +0000)]
Recognize canonical forms of vector shuffles where the same vector is used for
both source operands. In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand. Radar
7434842.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90417
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 3 Dec 2009 05:15:35 +0000 (05:15 +0000)]
Don't call getValueType() on a null SDValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90415
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 3 Dec 2009 03:43:29 +0000 (03:43 +0000)]
Fix this crasher, and add a FIXME for a missed optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90408
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 3 Dec 2009 02:31:43 +0000 (02:31 +0000)]
Fill out codegen SSA updater. It's not yet tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90395
91177308-0d34-0410-b5e6-
96231b3b80d8