Chris Lattner [Mon, 21 Dec 2009 07:52:40 +0000 (07:52 +0000)]
improve compatibility with SWIG, patch by James Knight!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91822
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 07:45:57 +0000 (07:45 +0000)]
revert r89298, which was committed without a testcase. I think
the underlying PHI node insertion issue in SSAUpdate is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91821
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 07:16:11 +0000 (07:16 +0000)]
fix PR5837 by having SSAUpdate reuse phi nodes for the
'GetValueInMiddleOfBlock' case, instead of inserting
duplicates.
A similar fix is almost certainly needed by the machine-level
SSAUpdate implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91820
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 07:15:15 +0000 (07:15 +0000)]
add a helper ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91819
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 21 Dec 2009 06:49:24 +0000 (06:49 +0000)]
Change StringRef::startswith and StringRef::endswith to versions which are a
bit more verbose, but optimize to much shorter code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91817
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 06:08:50 +0000 (06:08 +0000)]
add check lines for min/max tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91816
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 06:06:10 +0000 (06:06 +0000)]
really convert this to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91815
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 06:03:05 +0000 (06:03 +0000)]
give instcombine some helper functions for matching MIN and MAX, and
implement some optimizations for MIN(MIN()) and MAX(MAX()) and
MIN(MAX()) etc. This substantially improves the code in PR5822 but
doesn't kick in much elsewhere. 2 max's were optimized in
pairlocalalign and one in smg2000.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91814
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 05:53:13 +0000 (05:53 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91813
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 04:04:05 +0000 (04:04 +0000)]
enhance x-(-A) -> x+A to preserve NUW/NSW.
Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.
Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91812
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 03:19:28 +0000 (03:19 +0000)]
Optimize all cases of "icmp (X+Cst), X" to something simpler. This triggers
a bunch in lencode, ldecod, spass, 176.gcc, 252.eon, among others. It is
also the first part of PR5822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91811
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Dec 2009 03:11:05 +0000 (03:11 +0000)]
convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91810
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 19 Dec 2009 23:32:32 +0000 (23:32 +0000)]
Fixed use of phi param in SlotIndex constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91790
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Dec 2009 21:29:22 +0000 (21:29 +0000)]
fix an overly conservative caching issue that caused memdep to
cache a pointer as being unavailable due to phi trans in the
wrong place. This would cause later queries to fail even when
they didn't involve phi trans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91787
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 21:27:30 +0000 (21:27 +0000)]
CMake: Update lib deps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Dec 2009 20:56:53 +0000 (20:56 +0000)]
.llx is no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Dec 2009 20:44:43 +0000 (20:44 +0000)]
fix inconsistent use of tabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91783
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 18:58:49 +0000 (18:58 +0000)]
Remove unused variable (noticed by clang++).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91780
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 17:11:53 +0000 (17:11 +0000)]
#if 0 out X86 disassembler for now, it is breaking the build in multiple places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91778
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 19 Dec 2009 13:52:01 +0000 (13:52 +0000)]
Emit direction operand in binary insns that stores in memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91777
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 19 Dec 2009 13:13:29 +0000 (13:13 +0000)]
Adding a bunch of options to the mcc16 driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91776
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sat, 19 Dec 2009 12:07:00 +0000 (12:07 +0000)]
rename dprintf to dbgpritnf, in order to fix build with glibc (which already defines dprintf in stdio.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91775
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sat, 19 Dec 2009 11:52:18 +0000 (11:52 +0000)]
fix build and while at it remove a redudant include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91774
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 19 Dec 2009 11:38:14 +0000 (11:38 +0000)]
Test cases for changes done in 91768.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91773
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 19 Dec 2009 08:26:25 +0000 (08:26 +0000)]
1. In indirect load/store insns , the name of fsr should be emitted as INDF.
2. include standard asmbly headers in generated asmbly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91768
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 19 Dec 2009 07:05:23 +0000 (07:05 +0000)]
Fix a bunch of little errors that Clang complains about when its being pedantic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Dec 2009 07:01:15 +0000 (07:01 +0000)]
fix PR5827 by disabling the phi slicing transformation in a case
where instcombine would have to split a critical edge due to a
phi node of an invoke. Since instcombine can't change the CFG,
it has to bail out from doing the transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91763
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 19 Dec 2009 06:53:17 +0000 (06:53 +0000)]
Update my SROA changes in response to review.
* change FindElementAndOffset to return a uint64_t instead of unsigned, and
to identify the type to be used for that result in a GEP instruction.
* move "isa<ConstantInt>" to be first in conditional.
* replace some dyn_casts with casts.
* add a comment about handling mem intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91762
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 04:16:57 +0000 (04:16 +0000)]
More bzero -> memset that I missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91757
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 04:16:48 +0000 (04:16 +0000)]
Add missing newlines at EOF (for clang++).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91756
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 19 Dec 2009 03:31:50 +0000 (03:31 +0000)]
Use memset instead of bzero, its more portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91754
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 19 Dec 2009 03:21:36 +0000 (03:21 +0000)]
Remove spurious semicolon. Thanks, Clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91752
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Sat, 19 Dec 2009 02:59:52 +0000 (02:59 +0000)]
Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit
incarnations), integrated into the MC framework.
The disassembler is table-driven, using a custom TableGen backend to
generate hierarchical tables optimized for fast decode. The disassembler
consumes MemoryObjects and produces arrays of MCInsts, adhering to the
abstract base class MCDisassembler (llvm/MC/MCDisassembler.h).
The disassembler is documented in detail in
- lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime)
- utils/TableGen/DisassemblerEmitter.cpp (table emitter)
You can test the disassembler by running llvm-mc -disassemble for i386
or x86_64 targets. Please let me know if you encounter any problems
with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91749
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Dec 2009 02:04:23 +0000 (02:04 +0000)]
Bump alignment requirements for windows targets to achieve compartibility with vcpp.
Based on patch by Michael Beck!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91745
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Dec 2009 02:04:00 +0000 (02:04 +0000)]
Use 4-arg getVTList) variant instead of generic one, when possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91744
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 19 Dec 2009 01:47:13 +0000 (01:47 +0000)]
Delete unused code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91743
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 19 Dec 2009 01:46:34 +0000 (01:46 +0000)]
Fix a spello in a comment that Nick spotted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91742
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 19 Dec 2009 01:46:09 +0000 (01:46 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91741
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Dec 2009 01:38:42 +0000 (01:38 +0000)]
Make some methods const. The only interesting change here is that
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91740
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 19 Dec 2009 00:55:12 +0000 (00:55 +0000)]
Qualify a bunch of explicit template instantiations to satisfy clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91736
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 19 Dec 2009 00:51:42 +0000 (00:51 +0000)]
Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from
the templates in TypesContext.h can find them. Caught by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91735
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 19 Dec 2009 00:05:07 +0000 (00:05 +0000)]
Forgot forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91732
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 23:42:08 +0000 (23:42 +0000)]
Eliminate unnecessary LLVMContexts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91729
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Dec 2009 23:32:53 +0000 (23:32 +0000)]
Changes from review:
- Move DisableScheduling flag into TargetOption.h
- Move SDNodeOrdering into its own header file. Give it a minimal interface that
doesn't conflate construction with storage.
- Move assigning the ordering into the SelectionDAGBuilder.
This isn't used yet, so there should be no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91727
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 23:18:03 +0000 (23:18 +0000)]
Make this comment more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91722
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 18 Dec 2009 21:38:44 +0000 (21:38 +0000)]
Fix an issue in googletest where a name was used before it was defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91718
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 18 Dec 2009 21:31:31 +0000 (21:31 +0000)]
Increase opportunities to optimize (brcond (srl (and c1), c2)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91717
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 18 Dec 2009 21:07:18 +0000 (21:07 +0000)]
Fix gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91715
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 18 Dec 2009 20:35:38 +0000 (20:35 +0000)]
Catch more cases of a pointer being marked garbage twice. This helps when
debugging some leaks (PR5770 in particular).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91713
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 18 Dec 2009 20:14:40 +0000 (20:14 +0000)]
Reapply 91459 with a simple fix for the problem that broke the x86_64-darwin
bootstrap. This also replaces the WeakVH references that Chris objected to
with normal Value references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 18 Dec 2009 20:12:14 +0000 (20:12 +0000)]
Fix another parallel make race condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91709
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 18 Dec 2009 20:09:14 +0000 (20:09 +0000)]
Formalize MDNode's function-localness:
- an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR
- function-localness is designated via lowest bit in SubclassData
- getLocalFunction() descends MDNode tree to see if it is consistently function-local
Add verification of MDNodes to checks that MDNodes are consistently function-local.
Update AsmWriter to use isFunctionLocal().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91708
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 18 Dec 2009 19:59:48 +0000 (19:59 +0000)]
Fix Win32 Path.inc for API update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91706
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 18:45:31 +0000 (18:45 +0000)]
Revert this use of NUW/NSW also. Overflow-undefined multiplication isn't
associative either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91701
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 18 Dec 2009 16:59:39 +0000 (16:59 +0000)]
Fix libstdc++ build on ARM linux and part of PR5770.
MI was not being used but it was also not being deleted, so it was kept in the garbage list. The memory itself was freed once the function code gen was done.
Once in a while the codegen of another function would create an instruction on the same address. Adding it to the garbage group would work once, but when another pointer was added it would cause an assert as "Cache" was about to be pushed to Ts.
For a patch that make us detect problems like this earlier, take a look at
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20091214/092758.html
With that patch we assert as soon and the new instruction is added to the garbage set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91691
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 18 Dec 2009 13:00:34 +0000 (13:00 +0000)]
Fix wrong frame pointer save offset in the 64-bit PowerPC SVR4 ABI.
Patch contributed by Ken Werner of IBM!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91681
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 18 Dec 2009 13:00:15 +0000 (13:00 +0000)]
Add support for calls through function pointers in the 64-bit PowerPC SVR4 ABI.
Patch contributed by Ken Werner of IBM!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91680
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 18 Dec 2009 11:27:26 +0000 (11:27 +0000)]
Make 'set_option' work with list options.
This works now: (set_option "list_opt", ["val_1", "val_2", "val_3"])
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91679
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 18 Dec 2009 08:22:35 +0000 (08:22 +0000)]
Optimize icmp of null and select of two constants even if the select has
multiple uses. (The construct in question was found in gcc.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91675
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 18 Dec 2009 07:40:29 +0000 (07:40 +0000)]
On recent Intel u-arch's, folding loads into some unary SSE instructions can
be non-optimal. To be precise, we should avoid folding loads if the instructions
only update part of the destination register, and the non-updated part is not
needed. e.g. cvtss2sd, sqrtss. Unfolding the load from these instructions breaks
the partial register dependency and it can improve performance. e.g.
movss (%rdi), %xmm0
cvtss2sd %xmm0, %xmm0
instead of
cvtss2sd (%rdi), %xmm0
An alternative method to break dependency is to clear the register first. e.g.
xorps %xmm0, %xmm0
cvtss2sd (%rdi), %xmm0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91672
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 03:57:04 +0000 (03:57 +0000)]
Revert this use of NSW; this one isn't actually safe. NSW addition
is not reassociative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91667
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 03:25:51 +0000 (03:25 +0000)]
Eliminte unnecessary uses of <cstdio>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91666
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 03:10:26 +0000 (03:10 +0000)]
Add utility routines for NSW multiply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91664
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:58:50 +0000 (02:58 +0000)]
Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:14:37 +0000 (02:14 +0000)]
Delete an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91659
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 18 Dec 2009 02:12:53 +0000 (02:12 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 02:09:29 +0000 (02:09 +0000)]
Preserve NSW information in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91656
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 18 Dec 2009 01:59:21 +0000 (01:59 +0000)]
Re-apply 91623 now that I actually know what I was trying to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:24:09 +0000 (01:24 +0000)]
Add Loop contains utility methods for testing whether a loop
contains another loop, or an instruction. The loop form is
substantially more efficient on large loops than the typical
code it replaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91654
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:20:44 +0000 (01:20 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91653
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:14:11 +0000 (01:14 +0000)]
Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:05:06 +0000 (01:05 +0000)]
Tidy up this testcase and add test for tailcall optimization
with unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91650
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 18 Dec 2009 01:03:29 +0000 (01:03 +0000)]
Handle ARM inline asm "w" constraints with 64-bit ("d") registers.
The change in SelectionDAGBuilder is needed to allow using bitcasts to convert
between f64 (the default type for ARM "d" registers) and 64-bit Neon vector
types. Radar
7457110.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91649
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 01:02:18 +0000 (01:02 +0000)]
Remove "tail" keywords. These calls are not intended to be tail calls.
This protects this test from depending on codegen not performing the
tail call optimization by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91648
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:38:08 +0000 (00:38 +0000)]
Don't pass const pointers by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91647
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:28:43 +0000 (00:28 +0000)]
Update a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91645
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 18 Dec 2009 00:27:18 +0000 (00:27 +0000)]
Pass the error string directly to llvm_unreachable instead of the residual
(0 && "error"). Rough consensus seems to be that g++ *should* be diagnosing
this because the pointer makes it not an ICE in c++03. Everyone agrees that
the current standard is silly and null-pointer-ness should not be based on
ICE-ness. Excellent fight scene in Act II, denouement weak, two stars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91644
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 18 Dec 2009 00:11:44 +0000 (00:11 +0000)]
Add test case for the phi reuse patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:06:20 +0000 (00:06 +0000)]
Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Dec 2009 00:03:58 +0000 (00:03 +0000)]
Add an svn:ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91639
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Fri, 18 Dec 2009 00:01:26 +0000 (00:01 +0000)]
Instruction fixes, added instructions, and AsmString changes in the
X86 instruction tables.
Also (while I was at it) cleaned up the X86 tables, removing tabs and
80-line violations.
This patch was reviewed by Chris Lattner, but please let me know if
there are any problems.
* X86*.td
Removed tabs and fixed 80-line violations
* X86Instr64bit.td
(IRET, POPCNT, BT_, LSL, SWPGS, PUSH_S, POP_S, L_S, SMSW)
Added
(CALL, CMOV) Added qualifiers
(JMP) Added PC-relative jump instruction
(POPFQ/PUSHFQ) Added qualifiers; renamed PUSHFQ to indicate
that it is 64-bit only (ambiguous since it has no
REX prefix)
(MOV) Added rr form going the other way, which is encoded
differently
(MOV) Changed immediates to offsets, which is more correct;
also fixed MOV64o64a to have to a 64-bit offset
(MOV) Fixed qualifiers
(MOV) Added debug-register and condition-register moves
(MOVZX) Added more forms
(ADC, SUB, SBB, AND, OR, XOR) Added reverse forms, which
(as with MOV) are encoded differently
(ROL) Made REX.W required
(BT) Uncommented mr form for disassembly only
(CVT__2__) Added several missing non-intrinsic forms
(LXADD, XCHG) Reordered operands to make more sense for
MRMSrcMem
(XCHG) Added register-to-register forms
(XADD, CMPXCHG, XCHG) Added non-locked forms
* X86InstrSSE.td
(CVTSS2SI, COMISS, CVTTPS2DQ, CVTPS2PD, CVTPD2PS, MOVQ)
Added
* X86InstrFPStack.td
(COM_FST0, COMP_FST0, COM_FI, COM_FIP, FFREE, FNCLEX, FNOP,
FXAM, FLDL2T, FLDL2E, FLDPI, FLDLG2, FLDLN2, F2XM1, FYL2X,
FPTAN, FPATAN, FXTRACT, FPREM1, FDECSTP, FINCSTP, FPREM,
FYL2XP1, FSINCOS, FRNDINT, FSCALE, FCOMPP, FXSAVE,
FXRSTOR)
Added
(FCOM, FCOMP) Added qualifiers
(FSTENV, FSAVE, FSTSW) Fixed opcode names
(FNSTSW) Added implicit register operand
* X86InstrInfo.td
(opaque512mem) Added for FXSAVE/FXRSTOR
(offset8, offset16, offset32, offset64) Added for MOV
(NOOPW, IRET, POPCNT, IN, BTC, BTR, BTS, LSL, INVLPG, STR,
LTR, PUSHFS, PUSHGS, POPFS, POPGS, LDS, LSS, LES, LFS,
LGS, VERR, VERW, SGDT, SIDT, SLDT, LGDT, LIDT, LLDT,
LODSD, OUTSB, OUTSW, OUTSD, HLT, RSM, FNINIT, CLC, STC,
CLI, STI, CLD, STD, CMC, CLTS, XLAT, WRMSR, RDMSR, RDPMC,
SMSW, LMSW, CPUID, INVD, WBINVD, INVEPT, INVVPID, VMCALL,
VMCLEAR, VMLAUNCH, VMRESUME, VMPTRLD, VMPTRST, VMREAD,
VMWRITE, VMXOFF, VMXON) Added
(NOOPL, POPF, POPFD, PUSHF, PUSHFD) Added qualifier
(JO, JNO, JB, JAE, JE, JNE, JBE, JA, JS, JNS, JP, JNP, JL,
JGE, JLE, JG, JCXZ) Added 32-bit forms
(MOV) Changed some immediate forms to offset forms
(MOV) Added reversed reg-reg forms, which are encoded
differently
(MOV) Added debug-register and condition-register moves
(CMOV) Added qualifiers
(AND, OR, XOR, ADC, SUB, SBB) Added reverse forms, like MOV
(BT) Uncommented memory-register forms for disassembler
(MOVSX, MOVZX) Added forms
(XCHG, LXADD) Made operand order make sense for MRMSrcMem
(XCHG) Added register-register forms
(XADD, CMPXCHG) Added unlocked forms
* X86InstrMMX.td
(MMX_MOVD, MMV_MOVQ) Added forms
* X86InstrInfo.cpp: Changed PUSHFQ to PUSHFQ64 to reflect table
change
* X86RegisterInfo.td: Added debug and condition register sets
* x86-64-pic-3.ll: Fixed testcase to reflect call qualifier
* peep-test-3.ll: Fixed testcase to reflect test qualifier
* cmov.ll: Fixed testcase to reflect cmov qualifier
* loop-blocks.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-11.ll: Fixed testcase to reflect call qualifier
* 2009-11-04-SubregCoalescingBug.ll: Fixed testcase to reflect call
qualifier
* x86-64-pic-2.ll: Fixed testcase to reflect call qualifier
* live-out-reg-info.ll: Fixed testcase to reflect test qualifier
* tail-opts.ll: Fixed testcase to reflect call qualifiers
* x86-64-pic-10.ll: Fixed testcase to reflect call qualifier
* bss-pagealigned.ll: Fixed testcase to reflect call qualifier
* x86-64-pic-1.ll: Fixed testcase to reflect call qualifier
* widen_load-1.ll: Fixed testcase to reflect call qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91638
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 17 Dec 2009 23:49:16 +0000 (23:49 +0000)]
Sundry dependent-name fixes flagged by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91636
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 23:45:18 +0000 (23:45 +0000)]
Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91635
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 23:42:32 +0000 (23:42 +0000)]
Turn off critical edge splitting for landing pads. The introduction of a
non-landing pad basic block as the successor to a block that ends in an
unconditional jump will cause block folding to remove the added block as a
successor. Thus eventually removing it AND the landing pad entirely. Critical
edge splitting is an optimization, so we can safely turn it off when dealing
with landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91634
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 22:44:34 +0000 (22:44 +0000)]
Revert r91623 to unbreak the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91632
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 22:42:29 +0000 (22:42 +0000)]
Allow instcombine to combine "sext(a) >u const" to "a >u trunc(const)".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91631
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 21:35:29 +0000 (21:35 +0000)]
Don't codegen available_externally functions. Fixes llvm.org/PR5735.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91626
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 21:27:47 +0000 (21:27 +0000)]
Make the ptrtoint comparison simplification work if one side is a global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91624
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 21:23:58 +0000 (21:23 +0000)]
Remove an unused option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Dec 2009 21:23:46 +0000 (21:23 +0000)]
tabs -> spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91622
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 17 Dec 2009 21:07:31 +0000 (21:07 +0000)]
Slightly generalize transformation of memmove(a,a,n) so that it also applies
to memcpy. (Such a memcpy is technically illegal, but in practice is safe
and is generated by struct self-assignment in C code.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91621
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 21:02:39 +0000 (21:02 +0000)]
Make Path use StringRef instead of std::string where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91620
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Dec 2009 20:41:01 +0000 (20:41 +0000)]
Temporarily revert 91337. It's causing testcase failures.
$ svn merge -c -91337 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91337 into '.':
U lib/CodeGen/AsmPrinter/DwarfException.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91618
91177308-0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 17 Dec 2009 20:39:34 +0000 (20:39 +0000)]
Fix Windows build breakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91617
91177308-0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Thu, 17 Dec 2009 20:09:43 +0000 (20:09 +0000)]
Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() in
LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple
type by one, getHalfSizedIntegerVT() searches for the smallest simple integer
type that is at least half the size of the type it is called on. This approach
has the advantage that it will continue working if a new value type (such as
i24) is added to MVT.
Also, in preparation for new value types, remove the assertions that
non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and
truncstore operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Dec 2009 20:00:21 +0000 (20:00 +0000)]
finish cleaning up StructLayoutMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91612
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 17 Dec 2009 19:55:06 +0000 (19:55 +0000)]
This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91611
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 17 Dec 2009 19:07:19 +0000 (19:07 +0000)]
Fix unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91609
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 17 Dec 2009 18:34:24 +0000 (18:34 +0000)]
Re-revert 91459. It's breaking the x86_64 darwin bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91607
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Dec 2009 18:03:12 +0000 (18:03 +0000)]
Remove debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91604
91177308-0d34-0410-b5e6-
96231b3b80d8