Commit Graph

33023 Commits

Author SHA1 Message Date
Evan Cheng
ff89dcb06f -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixed
stack slots and giving them different PseudoSourceValue's did not fix the
problem of post-alloc scheduling miscompiling llvm itself.
- Apply Dan's conservative workaround by assuming any non fixed stack slots can
alias other memory locations. This means a load from spill slot #1 cannot 
move above a store of spill slot #2. 
- Enable post-alloc scheduling for x86 at optimization leverl Default and above.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 18:16:27 +00:00
Evan Cheng
20270c9093 Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 06:27:36 +00:00
Chris Lattner
c6e2009608 remove some nonascii weird stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 05:27:44 +00:00
Chris Lattner
cf4d2f11a1 add some fixme's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 05:09:15 +00:00
Chris Lattner
98b532cf33 remove the IndMemRemPass, which only made sense for when malloc/free were intrinsic
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 05:02:09 +00:00
Chris Lattner
0ec5c32489 fix the other issue with ID's, hopefully really fixing the linux build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:58:34 +00:00
Chris Lattner
28717a8a60 fix some problems with ID definitions, which will hopefully fix the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:27:14 +00:00
Chris Lattner
b839c5577d add function passes for printing various dominator datastructures
accessible through opt.  Patch by Tobias Grosser!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:10:40 +00:00
Chris Lattner
88067b9133 make DOTGraphTraits public, patch by Tobias Grosser!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 04:09:11 +00:00
Nick Lewycky
3fc35c594c Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 23:52:26 +00:00
Chris Lattner
391d23b6c2 inline isGEP away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 23:48:54 +00:00
Daniel Dunbar
c499e32b37 Fix my -Asserts warning fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 23:15:04 +00:00
Chris Lattner
59c4eba416 Teach vm core to more aggressively fold 'trunc' constantexprs,
allowing it to simplify the crazy constantexprs in the testcases
down to something sensible.  This allows -std-compile-opts to
completely "devirtualize" the pointers to member functions in
the testcase from PR5176.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 21:53:27 +00:00
Daniel Dunbar
9bd34602fb Move UnescapeString to a static function for its sole client; its inefficient and broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:42 +00:00
Daniel Dunbar
ca107c5c18 Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:29 +00:00
Daniel Dunbar
3446cf142e Use raw_ostream::write_escaped instead of EscapeString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:19 +00:00
Daniel Dunbar
522b113a75 Add raw_ostream::write_escaped, for writing escaped strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:43:08 +00:00
Mikhail Glushenkov
0a22fb6664 First draft of the OptionPreprocessor.
More to follow...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:09:29 +00:00
Nick Lewycky
2bb6f6ae7a Emit newlines at the end of instructions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 19:43:45 +00:00
Daniel Dunbar
4dee7fd2c2 Move StringMap's string has function into StringExtras.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:21:06 +00:00
Daniel Dunbar
4e34a3912a Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:11:57 +00:00
Daniel Dunbar
afc1587800 Suppress -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 09:33:00 +00:00
Evan Cheng
491f54f1fd Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 09:20:14 +00:00
Evan Cheng
6553155172 Revert 84315 for now. Re-thinking the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 07:53:04 +00:00
Evan Cheng
bf125583f8 Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 06:22:26 +00:00
Evan Cheng
cac25a9452 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 06:05:11 +00:00
Chris Lattner
6128df5255 Simplify some code (first hunk) and fix PR5208 (second hunk) by
updating the callgraph when introducing a call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 05:39:39 +00:00
Dan Gohman
f77fc92b03 Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 01:37:38 +00:00
Victor Hernandez
a276c603b8 Remove MallocInst from LLVM Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 01:18:07 +00:00
Dan Gohman
3bdd8de280 Enhance CodePlacementOpt's unconditional intra-loop branch elimination logic
to be more general and understand more varieties of loops.

Teach CodePlacementOpt to reorganize the basic blocks of a loop so that
they are contiguous. This also includes a fair amount of logic for preserving
fall-through edges while doing so. This fixes a BranchFolding-ism where blocks
which can't be made to use a fall-through edge and don't conveniently fit
anywhere nearby get tossed out to the end of the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:32:43 +00:00
Victor Hernandez
13ad5aaaff Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.

Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:00:19 +00:00
Victor Hernandez
8db42d2b1c HeapAllocSRoA also needs to check if malloc array size can be computed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 23:12:25 +00:00
Mon P Wang
3b7ee20d58 Allow widening of extract subvector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 22:05:48 +00:00
Devang Patel
808b82664f Do not emit name entry for a pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:27:43 +00:00
Evan Cheng
fa16354e03 Change createPostRAScheduler so it can be turned off at llc -O1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:06:15 +00:00
Dan Gohman
b00f236b03 Move zext and sext casts fed by loads into the same block as the
load, to help SelectionDAG fold them into the loads, unless
conditions are unfavorable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 20:59:35 +00:00
Devang Patel
a43d46f523 Parse PHI instruction with attached metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:45:49 +00:00
Devang Patel
149aa7cce3 If there is not any llvm instruction associated with each lexical scope encoded in debug info then create such scope on demand for variable info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:18:03 +00:00
Victor Hernandez
136526ce2d Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size.
Thanks to Duncan Sands for noticing this bug.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:08:17 +00:00
Duncan Sands
ed90342d8a Strip trailing white space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 15:20:13 +00:00
Benjamin Kramer
6f892bbaf9 Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 10:29:08 +00:00
Sanjiv Gupta
5386a35c5a Cleaned up some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 08:58:34 +00:00
Evan Cheng
b46aea1032 I am no spelling bee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 06:18:09 +00:00
Evan Cheng
d3dd50fec0 Enable post-alloc scheduling for all ARM variants except for Thumb1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 06:11:08 +00:00
Evan Cheng
c83da2f9e3 If post-alloc scheduler is not enabled, it should return false, not true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 06:10:34 +00:00
Zhongxing Xu
931424a7d8 Indent code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 05:42:28 +00:00
Evan Cheng
fee0c1074c Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 05:33:58 +00:00
Evan Cheng
449c25baa0 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 05:18:39 +00:00
Bob Wilson
1dd4348408 Fix more NEON instruction encodings.
Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 03:58:44 +00:00
Chris Lattner
cc4287a374 Add half precision floating point support (float16) to APFloat,
patch by Peter Johnson! (PR5195)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 02:13:51 +00:00
Chris Lattner
a43fc3452b add haiku support, patch by Paul Davey!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 02:06:30 +00:00
Daniel Dunbar
a4d8667c87 MC: Set symbol values in MachO MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:58:23 +00:00
Daniel Dunbar
7eb85194f2 Minor formatting tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:58:15 +00:00
Daniel Dunbar
1253a6fa3b MC: Switch assembler API to using MCExpr instead of MCValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84234 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:58:03 +00:00
Daniel Dunbar
e00b011e6a MC: Remove unneeded context argument to MCExpr::Evaluate*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:57:52 +00:00
Daniel Dunbar
75773ff00d MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
variables and symbols invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:57:39 +00:00
Daniel Dunbar
fffff915d5 MC: When parsing a variable reference, substitute absolute variables immediately
since they are allowed to be redefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:34:54 +00:00
Daniel Dunbar
7c3600de94 MC: Move assembler variable values from MCContext to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:33:57 +00:00
Daniel Dunbar
e579849652 MC: Switch MCContext value table to storing MCExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84228 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:33:11 +00:00
Evan Cheng
a846a8a1dc When checking aliases between phi sources and V2, we know the sources are not themselves phi nodes. However, V2 may be. Call aliasCheck with V2 first to potentially eliminate a std::swap call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 00:33:09 +00:00
Bob Wilson
934f98b536 Revert svn r80498 and replace it with a different solution. The only problem
I can see with the original code was that I forgot that this runs after
type legalization and hence the result type will always be i32. (Custom
legalization of EXTRACT_VECTOR_ELT is only enabled for vector types with
8- and 16-bit elements.)

Regarding the FIXME comment: any information about sign and zero-extension
should be captured by separate extension operations.  The DAG combiner should
handle those to produce either VGETLANEu or VGETLANEs, and that seems to be
working now.  If there are cases that we're missing, let me know.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 23:12:05 +00:00
Anton Korobeynikov
4fac9470c4 Dllexport stuff cleanup:
1. Emit external function type information for all COFF targets since it's
a feature of object format
2. Emit linker directives only for cygming (since this is ld-specific stuff)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 22:36:18 +00:00
Sandeep Patel
452b54a8ae Branches must be the last instruction in a Thumb2 IT block. Approved by Evan Cheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 22:25:32 +00:00
Bob Wilson
6f122625dd Fix encoding bits for N3VLInt3_QHS multiclass with 8-bit elements.
Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 21:57:47 +00:00
Kevin Enderby
e2a98dd2a4 Fix ARM memory operand parsing of post indexing with just a base register, that
is just "[Rn]" and no tailing comma with an offset, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 21:42:45 +00:00
Bob Wilson
b923953733 Fix a potential performance problem in placing ARM constant pools.
In the case where there are no good places to put constants and we fall back
upon inserting unconditional branches to make new blocks, allow all constant
pool references in range of those blocks to put constants there, even if that
means resetting the "high water marks" for those references.  This will still
terminate because you can't keep splitting blocks forever, and in the bad
cases where we have to split blocks, it is important to avoid splitting more
than necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 20:49:47 +00:00
Kevin Enderby
515d509360 More bits of the ARM target assembler for llvm-mc, code added to parse labels
as expressions, code for parsing a few arm specific directives (still needs
the MCStreamer calls for these).  Some clean up of the operand parsing code
and adding some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 20:48:48 +00:00
Evan Cheng
79f7400e4f Remove X86Subtarget::IsLinux. It's no longer being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 20:23:21 +00:00
Victor Hernandez
2491ce0353 Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper
identifying the malloc as a non-array malloc.  This broke GlobalOpt's optimization of stores of mallocs 
to global variables.

The fix is to classify malloc's into 3 categories:
1. non-array mallocs
2. array mallocs whose array size can be determined
3. mallocs that cannot be determined to be of type 1 or 2 and cannot be optimized

getMallocArraySize() returns NULL for category 3, and all users of this function must avoid their 
malloc optimization if this function returns NULL.

Eventually, currently unexpected codegen for computing the malloc's size argument will be supported in
isArrayMalloc() and getMallocArraySize(), extending malloc optimizations to those examples.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 20:14:52 +00:00
Benjamin Kramer
5814fefc7f Add files Sanjiv forgot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 19:46:34 +00:00
Sanjiv Gupta
753ec15d5f Re-apply 84180 with the fixed test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 19:26:25 +00:00
Jakob Stoklund Olesen
6ad8c84d70 Move Blackfin intrinsics into the Target/Blackfin directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:50:52 +00:00
Jakob Stoklund Olesen
11ee508d7b Report errors correctly for unselected target intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:50:03 +00:00
Jakob Stoklund Olesen
0383606b65 Clean up TargetIntrinsicInfo API. Add pure virtual methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:49:26 +00:00
Nick Lewycky
20312d0bb8 Add missing break statements! Thanks to Duncan Sands for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 18:48:58 +00:00
Daniel Dunbar
1ead150c92 Revert "Complete Rewrite of AsmPrinter, TargetObjectFile based on new
PIC16Section class", it breaks globals.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 15:02:14 +00:00
Sanjiv Gupta
8da373cf62 Complete Rewrite of AsmPrinter, TargetObjectFile based on new PIC16Section class
derived from MCSection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 10:10:43 +00:00
Sanjiv Gupta
cf1e5be2a2 Few changes to comply with new DebugInfo Metadata representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 09:48:25 +00:00
Nick Lewycky
6e9e010752 Teach basicaa about memcpy/memmove/memset. The length argument can be used to
improve alias results if constant, and the source pointer can't be modified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 07:11:24 +00:00
Nick Lewycky
2d3820c29c Teach BasicAA to use the size parameter of the memory use marker intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 06:12:11 +00:00
Bob Wilson
549dda9d82 Be smarter about reusing constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 05:52:29 +00:00
Bob Wilson
36fa5321ba Fix another problem with ARM constant pools. Radar 7303551.
When ARMConstantIslandPass cannot find any good locations (i.e., "water") to
place constants, it falls back to inserting unconditional branches to make a
place to put them.  My recent change exposed a problem in this area.  We may
sometimes append to the same block more than one unconditional branch.  The
symptoms of this are that the generated assembly has a branch to an undefined
label and running llc with -debug will cause a seg fault.

This happens more easily since my change to prevent CPEs from moving from
lower to higher addresses as the algorithm iterates, but it could have
happened before.  The end of the block may be in range for various constant
pool references, but the insertion point for new CPEs is not right at the end
of the block -- it is at the end of the CPEs that have already been placed
at the end of the block.  The insertion point could be out of range.  When
that happens, the fallback code will always append another unconditional
branch if the end of the block is in range.

The fix is to only append an unconditional branch if the block does not
already end with one.  I also removed a check to see if the constant pool load
instruction is at the end of the block, since that is redundant with
checking if the end of the block is in-range.

There is more to be done here, but I think this fixes the immediate problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 05:10:36 +00:00
Chris Lattner
2ee743b53b only try to fold constantexpr operands when the worklist is first populated,
don't bother every time going around the main worklist.  This speeds up a 
release-asserts opt -std-compile-opts on 403.gcc by about 4% (1.5s).  It
seems to speed up the most expensive instances of instcombine by ~10%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 04:59:28 +00:00
Chris Lattner
e2cc1ad230 don't bother calling ConstantFoldInstruction unless there is a use of the
instruction (which disqualifies stores, unreachable, etc) and at least the
first operand is a constant.  This filters out a lot of obvious cases that
can't be folded.  Also, switch the IRBuilder to a TargetFolder, which tries
harder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 04:13:44 +00:00
Nick Lewycky
22c031296c Take advantage of TargetData when available; we know that the atomic intrinsics
only dereference the element they point to directly with no pointer arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 00:36:35 +00:00
Dan Gohman
cd2ae14ce3 Make CodePlacementOpt align loops, rather than loop headers. The
header is just the entry block to the loop, and it needn't be at
the top of the loop in the code layout.

Remove the code that suppressed loop alignment for outer loops,
so that outer loops are aligned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 00:36:22 +00:00
Evan Cheng
a2f8047134 When LiveVariables is adding implicit-def to model "partial dead", add the earlyclobber marker if the superreg def has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 23:39:27 +00:00
Evan Cheng
0789707c49 Print earlyclobber for implicit-defs as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 23:37:31 +00:00
Bob Wilson
b3642dccee Fix instruction encoding bits for NEON VPADAL.
Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:43:17 +00:00
Bob Wilson
681a2ad403 Remove unused variables to fix build warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:40:45 +00:00
Jim Grosbach
33524c3b26 Make loop not recalc getNumOperands() each time around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:22:39 +00:00
Devang Patel
c90aefe95e Add support to record DbgScope as inlined scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:08:09 +00:00
Jim Grosbach
d0c3832754 quiet compiler warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 21:07:11 +00:00
Jim Grosbach
b9d319b585 Inst{11-8} for vshl should be 0b0101, not 0b1111.
Refs: A7-17 & A8-750.

Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 20:31:01 +00:00
Bob Wilson
8e86b5195b Set instruction encoding bits 4 and 7 for ARM register-register and
register-shifted-register instructions.  Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 19:00:24 +00:00
Bob Wilson
24f995d84b Refactor code to select NEON VST intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 18:32:29 +00:00
Devang Patel
9674d15120 Use isVoidTy()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 17:29:00 +00:00
Bob Wilson
3e36f13ba7 Refactor code to select NEON VLD intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 17:28:52 +00:00
Devang Patel
5db2c52270 Add copyMD to copy metadata from one instruction to another instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 17:02:49 +00:00
Bob Wilson
9649344cb5 More refactoring. NEON vst lane intrinsics can share almost all the code for
vld lane intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 16:46:45 +00:00