Commit Graph

59256 Commits

Author SHA1 Message Date
Sean Callanan
eb3a1ab796 Updated the install location for EnhancedDisassembly
on Mac OS X to use @rpath rather than an absolute
path.  Also allowed the version to be set using an
environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:53:42 +00:00
Dan Gohman
04d52f8435 Change variables which are exactly 16 bytes to be 16-byte-aligned too.
This fixes test/Transforms/GlobalOpt/gv-align.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:46:07 +00:00
Dan Gohman
c9ae19e465 Make globalopt refine global variable alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:14:16 +00:00
Bob Wilson
ec54d6ab84 Check for terminating conditions before adding PHIs to the worklists.
This is more efficient than adding them to the worklist and then ignoring them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:10:41 +00:00
Gabor Greif
9c0012e738 remove these merge-tracking properties as they
might interfere with merges to other branches (as Dan pointed out)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100157 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:08:26 +00:00
Dan Gohman
a4ae3a100d If the bitcode reader input stream isn't a multiple of 4 bytes, it's more
likely not a bitcode file at all, rather than being a bitcode file which
is truncated. Check for this case and issue a more relevant error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100156 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:03:51 +00:00
Bob Wilson
7272b92009 Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 23:06:38 +00:00
Bob Wilson
6f69035970 Rewrite another SSAUpdater function to avoid recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 23:05:58 +00:00
Eric Christopher
1d8f83d0a0 Revert r100143.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 22:54:42 +00:00
Devang Patel
c8e77640a5 Revert r100117.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 22:47:29 +00:00
David Greene
8ef3acba00 Add some switches helpful for debugging:
-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 22:43:57 +00:00
Evan Cheng
3ea97550e3 In 64-bit mode, use i64 to lower memcpy / memset instead of f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:27:45 +00:00
Devang Patel
24c20e2435 Do not eagerly record known previous location. DBG_VALUE may not cause a new label due to one or other reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:22:44 +00:00
Evan Cheng
6cdb7e22aa Skip checking preferred alignment of GVs defined in other translation units all together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:13:28 +00:00
Evan Cheng
42642d06c9 Add comments about DstAlign and SrcAlign.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100132 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:10:42 +00:00
Bob Wilson
33f22e8c66 Change another SSAUpdater function to avoid recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 20:04:30 +00:00
Bob Wilson
9bdb8f0717 Simplify the code to check for existing PHIs, now that it is only used in
one place.  This removes the template function added in svn 94690.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 19:53:48 +00:00
Bob Wilson
e8b64281ce The SSAUpdater should avoid recursive traversals of the CFG, since that may
blow out the stack for really big functions.  Start by fixing an easy case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100126 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:46:59 +00:00
Evan Cheng
94107ba9ce - Avoid using floating point stores to implement memset unless the value is zero.
- Do not try to infer GV alignment unless its type is sized. It's not possible to infer alignment if it has opaque type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:19:11 +00:00
Devang Patel
58c7aa61d4 Skip instructions until new scope is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 17:32:01 +00:00
Devang Patel
8935d90a90 Cosmetic changes.
Update comment, rename a local variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100116 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 17:16:48 +00:00
Benjamin Kramer
d48c1f9b10 Remove accidental include and add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 14:39:55 +00:00
Benjamin Kramer
6a9cd41549 Various improvements to MemoryBuffer::getFile:
- Use a RAII object to close the FD.
- Use sys::StrError instead of thread-unsafe strerror calls.
- Recover gracefully if read returns zero. This works around an issue on
  DragonFlyBSD where /dev/null has an st_size of 136 but we can't read 136 bytes
  from it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 14:35:22 +00:00
Evan Cheng
0bf77de91f Add -mcpu to memcpy / memset tests to ensure they behave the same on all hosts / targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 08:25:26 +00:00
Gabor Greif
c8b82ccbcf Introduce ImmutableCallSite, useful for contexts where no mutation
is necessary. Inherits from new templated baseclass CallSiteBase<>
which is highly customizable. Base CallSite on it too, in a configuration
that allows full mutation.
Adapt some call sites in analyses to employ ImmutableCallSite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 08:21:08 +00:00
Nick Lewycky
2d7820cb78 Clean up this file a little, no functionality change. This is a subset of my
patch back in r94322.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 07:34:00 +00:00
Chris Lattner
a41b9153c3 switch IRBuilder to use NewDebugLoc for locations instead
of raw mdnodes.  This allows frontends to specify debug
locations without ever creating an MDNode for the DILocation.

This requires a corresponding clang/llvm-gcc change which
I'll try to commit as simultaneously as possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 06:31:45 +00:00
Chris Lattner
f0100ff3f6 add comments, don't require inlined-at to be specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 06:29:56 +00:00
Evan Cheng
255f20f7f7 Fix sdisel memcpy, memset, memmove lowering:
1. Makes it possible to lower with floating point loads and stores.
2. Avoid unaligned loads / stores unless it's fast.
3. Fix some memcpy lowering logic bug related to when to optimize a
   load from constant string into a constant.
4. Adjust x86 memcpy lowering threshold to make it more sane.
5. Fix x86 target hook so it uses vector and floating point memory
   ops more effectively.
rdar://7774704


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100090 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 06:04:33 +00:00
Evan Cheng
48c58bb861 Nehalem unaligned memory access is fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100089 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:58:17 +00:00
Chris Lattner
61336ae001 Switch the representation of the location in instruction from
being a TrackingVH<MDNode> to a NewDebugLoc, shrinking 
sizeof(Instruction) a lot, and providing clients the ability
to deal with locations in terms of NewDebugLoc instead of
having to deal with Metadata.  This is still fully compatible
with all clients that *do* use MDNodes for everything of
course.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:23:13 +00:00
Chris Lattner
b45218f7c8 include header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:20:21 +00:00
Chris Lattner
449c3103c5 rewrite handling of forward ref'd instruction metadata
to used deferred resolution instead of creating a temporary
node + rauw.  There is no reason to create the temporary
mdnode, then do rauw, then destroy it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:14:45 +00:00
Chris Lattner
e6bb172f7e change this from using '!dbg' to using '!dbgx'. The
MD used here isn't valid for !dbg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100085 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:13:10 +00:00
Chris Lattner
175edf2c78 fix a bug in DebugRecVH::deleted/allUsesReplacedWith. If an
entry in the Scope+InlinedAt drops to a non-canonical form,
we need to reset the idx member of both VH's to 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100084 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 05:12:07 +00:00
Chris Lattner
73180c5355 no really, we don't need to copy strings around in the accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 04:53:22 +00:00
Chris Lattner
fe805249f7 eliminate a temporary smallvector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100082 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 04:51:13 +00:00
Chris Lattner
68c5513499 add a method to decode a DILocation into a NewDebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 03:55:42 +00:00
Eric Christopher
ec306a9771 Add aeskeygenassist intrinsic and rename all of the aes intrinsics to
aes instead of sse4.2.  Add a brief todo for a subtarget flag and rework
the aeskeygenassist instruction to more closely match the docs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 03:05:45 +00:00
Erick Tryzelaar
221ae138ee There are no known O'Caml problems at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 01:53:24 +00:00
Chris Lattner
4e5f38ec6b update cmakefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100074 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 01:02:19 +00:00
Chris Lattner
b227925fa3 Add a new "NewDebugLoc" class which will eventually replace DebugLoc,
and will replace the 'DbgInfo' member in Instruction.

The benefit of NewDebugLoc is that it is compact (8 bytes vs 12/24 
bytes for the DbgInfo member in Instruction on a 32/64 bit system),
it means that we will end up not having to allocate MDNodes to 
represent the "DILocations" in common cases of -O0 -g, and it is
much more efficient to get things out of than the MDNode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 00:37:44 +00:00
Jim Grosbach
1118b5e490 vml[as] are slow on 1136jf-s also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 00:13:43 +00:00
Bill Wendling
e543d161a0 Reapply r100056. It doesn't look like it's the one that's causing a failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100065 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 00:00:43 +00:00
Mikhail Glushenkov
62d1da0bb9 Pass -m32/-m64 to assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 23:51:55 +00:00
Bill Wendling
9e9cca424c Revert r100056. It was causing a failure on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 23:26:26 +00:00
Stuart Hastings
f8df814869 Reverting 100048; it broke two Frontend debug info tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 23:08:46 +00:00
Bill Wendling
bbd51cd0a1 Rewrite CorrectExtraCFGEdges() to make it more understandable.
* Set the "DestA" and "DestB" according to how they're understood by the
  method. I.e., if one or both of them should point to the "fall through" block,
  then point to the fall through block.

* Improve the loop that removes superfluous edges to be more understandable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 22:54:38 +00:00
Bob Wilson
368454976c Add a redundant PHI testcase for SSAUpdater to go with svn r100047.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 21:38:43 +00:00
Stuart Hastings
a88cb38d02 Debug info can now properly represent functions inside classes inside other functions. Partial fix for Radar 7424645.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 21:10:54 +00:00