Commit Graph

56868 Commits

Author SHA1 Message Date
Zhongxing Xu
3a819568ca Fix a bunch of errors in the old logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:40:56 +00:00
Chris Lattner
3d606bbc92 fix a crash in loop unswitch on a loop invariant vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:26:54 +00:00
Chris Lattner
f96f1e013c remove an unreduced testcase, rename another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:23:37 +00:00
Evan Cheng
b2c9290a01 Perform sibcall in some cases when arguments are passes memory. Look for cases
where callee's arguments are already in the caller's own caller's stack and
they line up perfectly. e.g.

extern int foo(int a, int b, int c);

int bar(int a, int b, int c) {
  return foo(a, b, c);
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:22:50 +00:00
Sean Callanan
d74667e226 Removed an unnecessary class from the EDDisassembler
implementation.  Also made sure that the register maps
were created during disassembler initialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95051 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:18:20 +00:00
Dale Johannesen
5ce0ee9c09 Make local RA smarter about reusing input register of a copy
as output.  Needed for (functional) correctness in inline asm,
and should be generally beneficial.  7361612.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:08:02 +00:00
Zhongxing Xu
44eedb9805 11.8p1: A nested class is a member and as such has the same access rights as
any other member.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:57:01 +00:00
Dan Gohman
3b5487e627 LangRef.html says that inttoptr and ptrtoint always use zero-extension
when the cast is extending.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:44:02 +00:00
Dan Gohman
6acb86dcfa Factor out alignof expression folding into a separate function and
generalize it to handle more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:41:39 +00:00
Dan Gohman
8db08df5d3 Various code simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:38:49 +00:00
Daniel Dunbar
87641fa6dc Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:12:20 +00:00
Eric Christopher
11225dd710 Don't need to check the last argument since it'll always be bool. We also
don't use TargetData here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95040 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 00:51:45 +00:00
Eric Christopher
3a8bb73690 More indentation/tabification fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 00:13:06 +00:00
Eric Christopher
eae6ed1084 Untabify previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 00:06:55 +00:00
Sean Callanan
37ad4661b4 Changed to Chris Lattner's suggested approach, which
merely stubs out the blocks-based disassembly functions
if the library wasn't built with blocks, which allows a
constant .exports file and also properly deals with
situations in which the compiler used to build a client
is different from the compiler used to build the library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 00:04:46 +00:00
Nate Begeman
39bdc78e6f Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:56:58 +00:00
Sean Callanan
54c7788e99 Fix for builds with separate source and build
directories (like, oh, say, any multistage build)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:27:57 +00:00
Eric Christopher
6ddf0430e1 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:25:03 +00:00
Johnny Chen
92e63d817f MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Rn operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:06:04 +00:00
Sean Callanan
81b0c39927 Updated to use the proper .exports file for the
target platform, depending on whether the target
supports the blocks API or not


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:01:38 +00:00
Bill Wendling
f7d848349e Add "dump" method to IVUsersOneStride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95022 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:51:23 +00:00
Dale Johannesen
5e280a306a Testcase for 94996 (PR 6157)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:46:05 +00:00
Evan Cheng
7276c8c2b5 Fix PR6196. GV callee may not be a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:40:09 +00:00
Evan Cheng
e7ea6fd7cb Add test case for 95013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:32:42 +00:00
Mon P Wang
87c46d8a0e Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:15:09 +00:00
Sean Callanan
c54a747352 Rollback on including blocks functionality in .exports
because some platforms don't support blocks and then
break because the symbols aren't present


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 21:57:50 +00:00
Bob Wilson
6cad41778e Add an option to GVN to remove all partially redundant loads. This is currently
disabled by default.  This divides the existing load PRE code into 2 phases:
first it checks that it is safe to move the load to each of the predecessors
where it is unavailable, and then if it is safe, the code is changed to move
the load.  Radar 7571861.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 21:17:14 +00:00
Duncan Sands
aec0081fac Do an early exit when the result is known cheaply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:57:35 +00:00
Chris Lattner
b29d596072 eliminate a bunch of pointless LLVMContext arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:48:08 +00:00
Duncan Sands
a419b56d89 Fix typo "of" -> "or" and change the way a line was formatted to fit
into 80 columns to match my artistic preferences.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95000 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:42:02 +00:00
Chris Lattner
6304b0dd63 fix PR6195, a bug constant folding scalar -> vector compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94997 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:04:40 +00:00
Dale Johannesen
904c2fadbf fix PR 6157. Testcase pending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:54:53 +00:00
Chris Lattner
5f670d4131 cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:54:45 +00:00
Chris Lattner
b63127d435 fix PR6197 - infinite recursion in ipsccp due to block addresses
evaluateICmpRelation wasn't handling blockaddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:35:08 +00:00
Mon P Wang
c6654ec498 Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result
type is the same as the element type of the vector.  EXTRACT_VECTOR_ELT can
be used to extended the width of an integer type.  This fixes a bug for
Generic/vector-casts.ll on a ppc750.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:03:18 +00:00
Dan Gohman
a00ef1122c Update this test for a trivial register allocation difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:00:32 +00:00
Dan Gohman
4f8eea82d8 Generalize target-independent folding rules for sizeof to handle more
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.

Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.

Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.

And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:27:38 +00:00
Chris Lattner
d569561835 fix rdar://7590304, a miscompilation of objc apps on arm. The caller
of objc message send was getting marked arm_apcscc, but the prototype
isn't.  This is fine at runtime because objcmsgsend is implemented in
assembly.  Only turn a mismatched caller and callee into 'unreachable'
if the callee is a definition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:11:34 +00:00
Chris Lattner
830f3f205d fix rdar://7590304, an infinite loop in instcombine. In the invoke
case, instcombine can't zap the invoke for fear of changing the CFG.
However, we have to do something to prevent the next iteration of
instcombine from inserting another store -> undef before the invoke
thereby getting into infinite iteration between dead store elim and
store insertion.

Just zap the callee to null, which will prevent the next iteration
from doing anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:04:58 +00:00
Bob Wilson
3cb8509b68 Fix pr6198 by moving the isSized() check to an outer conditional.
The testcase from pr6198 does not crash for me -- I don't know what's up with
that -- so I'm not adding it to the tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 17:41:44 +00:00
Dan Gohman
d75ff3104c Add a getNUWMul function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94982 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 16:38:14 +00:00
Dan Gohman
2544a1de66 Add a generalized form of ConstantExpr::getOffsetOf which works for
array types as well as struct types, and which accepts arbitrary
Constant indicies.  


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 16:37:38 +00:00
Bruno Cardoso Lopes
9a720b0b0e MulOp is actually a Mips specific node, so do the match using Opcode. This fixes PR6192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 12:16:39 +00:00
Zhongxing Xu
746f5b6eb1 Add an immutable interval map, prepared to be used by flat memory model
in the analyzer. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94976 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 10:43:31 +00:00
Sean Callanan
7bb2929512 Whoops, left some debugging code in that broke
a buildbot.  Removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 09:02:24 +00:00
Sean Callanan
ee5dfd42f1 Added the enhanced disassembly library's implementation and
fleshed out the .exports file.  I still have to fix several
details of operand parsing, but the basic functionality is
there and usable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 08:49:35 +00:00
Zhongxing Xu
ddba25ab70 Simplify code. We can compare TNew with T in one batch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 07:32:52 +00:00
Evan Cheng
0a4fd46d9e Undo r94946 now all the tests are passing again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 02:13:39 +00:00
Bruno Cardoso Lopes
bdef66bf7f Fix stack size bug while using o32 abi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94969 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 02:03:24 +00:00
Johnny Chen
48d5ccf86a For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 11:22:28 +00:00