oota-llvm.git
15 years agoAdd a couple new testcases.
Nick Lewycky [Sun, 18 Oct 2009 00:42:07 +0000 (00:42 +0000)]
Add a couple new testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84385 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreplace a useless test with a useful one
Chris Lattner [Sat, 17 Oct 2009 23:59:51 +0000 (23:59 +0000)]
replace a useless test with a useful one

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84383 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore warnings patrol: Another unused argument and more implicit
Eric Christopher [Sat, 17 Oct 2009 23:56:18 +0000 (23:56 +0000)]
More warnings patrol: Another unused argument and more implicit
conversions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84382 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
Nick Lewycky [Sat, 17 Oct 2009 23:52:26 +0000 (23:52 +0000)]
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

15 years agoinline isGEP away.
Chris Lattner [Sat, 17 Oct 2009 23:48:54 +0000 (23:48 +0000)]
inline isGEP away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84373 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix my -Asserts warning fix.
Daniel Dunbar [Sat, 17 Oct 2009 23:15:04 +0000 (23:15 +0000)]
Fix my -Asserts warning fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach vm core to more aggressively fold 'trunc' constantexprs,
Chris Lattner [Sat, 17 Oct 2009 21:53:27 +0000 (21:53 +0000)]
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

15 years agoremove # uses from FileCheck lines.
Chris Lattner [Sat, 17 Oct 2009 21:51:19 +0000 (21:51 +0000)]
remove # uses from FileCheck lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84367 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename test
Chris Lattner [Sat, 17 Oct 2009 21:31:19 +0000 (21:31 +0000)]
rename test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84364 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove UnescapeString to a static function for its sole client; its inefficient and...
Daniel Dunbar [Sat, 17 Oct 2009 20:43:42 +0000 (20:43 +0000)]
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

15 years agoRemove llvm::EscapeString, raw_ostream::write_escaped is much faster.
Daniel Dunbar [Sat, 17 Oct 2009 20:43:29 +0000 (20:43 +0000)]
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

15 years agoUse raw_ostream::write_escaped instead of EscapeString.
Daniel Dunbar [Sat, 17 Oct 2009 20:43:19 +0000 (20:43 +0000)]
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

15 years agoAdd raw_ostream::write_escaped, for writing escaped strings.
Daniel Dunbar [Sat, 17 Oct 2009 20:43:08 +0000 (20:43 +0000)]
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

15 years agoFirst draft of the OptionPreprocessor.
Mikhail Glushenkov [Sat, 17 Oct 2009 20:09:29 +0000 (20:09 +0000)]
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

15 years agoThis variable is never used.
Mikhail Glushenkov [Sat, 17 Oct 2009 20:08:47 +0000 (20:08 +0000)]
This variable is never used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84351 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisallow multiple instances of PluginPriority.
Mikhail Glushenkov [Sat, 17 Oct 2009 20:08:30 +0000 (20:08 +0000)]
Disallow multiple instances of PluginPriority.

Several instances of PluginPriority in a single file most probably signifies a
programming error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84350 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-O[0-3] options should be also forwarded to opt and llc.
Mikhail Glushenkov [Sat, 17 Oct 2009 20:07:49 +0000 (20:07 +0000)]
-O[0-3] options should be also forwarded to opt and llc.

This will require implementing OptionPreprocessor to forbid invalid invocations
such as 'llvmc -O1 -O2'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84349 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEmit newlines at the end of instructions too.
Nick Lewycky [Sat, 17 Oct 2009 19:43:45 +0000 (19:43 +0000)]
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

15 years agoMove StringMap's string has function into StringExtras.h
Daniel Dunbar [Sat, 17 Oct 2009 18:21:06 +0000 (18:21 +0000)]
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

15 years agoRemove unnecessary include.
Daniel Dunbar [Sat, 17 Oct 2009 18:11:57 +0000 (18:11 +0000)]
Remove unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84336 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSuppress -Asserts warning.
Daniel Dunbar [Sat, 17 Oct 2009 09:33:00 +0000 (09:33 +0000)]
Suppress -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84327 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDistinquish stack slots from other stack objects. They (and fixed objects) get FixedS...
Evan Cheng [Sat, 17 Oct 2009 09:20:14 +0000 (09:20 +0000)]
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

15 years agoRe-arrange some fields.
Evan Cheng [Sat, 17 Oct 2009 08:57:09 +0000 (08:57 +0000)]
Re-arrange some fields.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another required #include for freestanding .h files.
Daniel Dunbar [Sat, 17 Oct 2009 08:12:36 +0000 (08:12 +0000)]
Add another required #include for freestanding .h files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 84315 for now. Re-thinking the patch.
Evan Cheng [Sat, 17 Oct 2009 07:53:04 +0000 (07:53 +0000)]
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

15 years agoRename getFixedStack to getStackObject. The stack objects represented are not
Evan Cheng [Sat, 17 Oct 2009 06:22:26 +0000 (06:22 +0000)]
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

15 years ago80 col violation.
Evan Cheng [Sat, 17 Oct 2009 06:05:11 +0000 (06:05 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84311 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify some code (first hunk) and fix PR5208 (second hunk) by
Chris Lattner [Sat, 17 Oct 2009 05:39:39 +0000 (05:39 +0000)]
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

15 years agocheck in a bunch of content from TestingGuide. Part of PR5216
Chris Lattner [Sat, 17 Oct 2009 04:47:42 +0000 (04:47 +0000)]
check in a bunch of content from TestingGuide.  Part of PR5216

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84309 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-as: Simplify, and don't create empty output files with -disable-output.
Daniel Dunbar [Sat, 17 Oct 2009 03:28:28 +0000 (03:28 +0000)]
llvm-as: Simplify, and don't create empty output files with -disable-output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84304 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReclaim a lost month.
Daniel Dunbar [Sat, 17 Oct 2009 03:28:20 +0000 (03:28 +0000)]
Reclaim a lost month.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84303 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd required #includes for freestanding .h files.
Daniel Dunbar [Sat, 17 Oct 2009 03:28:07 +0000 (03:28 +0000)]
Add required #includes for freestanding .h files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84302 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete an obsolete comment.
Dan Gohman [Sat, 17 Oct 2009 01:37:38 +0000 (01:37 +0000)]
Delete an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84300 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove MallocInst from LLVM Instructions.
Victor Hernandez [Sat, 17 Oct 2009 01:18:07 +0000 (01:18 +0000)]
Remove MallocInst from LLVM Instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnhance CodePlacementOpt's unconditional intra-loop branch elimination logic
Dan Gohman [Sat, 17 Oct 2009 00:32:43 +0000 (00:32 +0000)]
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

15 years agoAdd a splice member function which accepts a range instead of a
Dan Gohman [Sat, 17 Oct 2009 00:28:24 +0000 (00:28 +0000)]
Add a splice member function which accepts a range instead of a
single iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84294 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAutoupgrade malloc insts to malloc calls.
Victor Hernandez [Sat, 17 Oct 2009 00:00:19 +0000 (00:00 +0000)]
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

15 years agoHeapAllocSRoA also needs to check if malloc array size can be computed.
Victor Hernandez [Fri, 16 Oct 2009 23:12:25 +0000 (23:12 +0000)]
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

15 years agoUpdate tests to use FileCheck
Mon P Wang [Fri, 16 Oct 2009 22:09:05 +0000 (22:09 +0000)]
Update tests to use FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for r84279
Mon P Wang [Fri, 16 Oct 2009 22:07:19 +0000 (22:07 +0000)]
Add test case for r84279

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84280 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow widening of extract subvector
Mon P Wang [Fri, 16 Oct 2009 22:05:48 +0000 (22:05 +0000)]
Allow widening of extract subvector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not emit name entry for a pointer type.
Devang Patel [Fri, 16 Oct 2009 21:27:43 +0000 (21:27 +0000)]
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

15 years agoChange createPostRAScheduler so it can be turned off at llc -O1.
Evan Cheng [Fri, 16 Oct 2009 21:06:15 +0000 (21:06 +0000)]
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

15 years agoAdd a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not...
Evan Cheng [Fri, 16 Oct 2009 21:02:20 +0000 (21:02 +0000)]
Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove zext and sext casts fed by loads into the same block as the
Dan Gohman [Fri, 16 Oct 2009 20:59:35 +0000 (20:59 +0000)]
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

15 years agoParse PHI instruction with attached metadata.
Devang Patel [Fri, 16 Oct 2009 18:45:49 +0000 (18:45 +0000)]
Parse PHI instruction with attached metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf there is not any llvm instruction associated with each lexical scope encoded in...
Devang Patel [Fri, 16 Oct 2009 18:18:03 +0000 (18:18 +0000)]
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

15 years agoInvert isSafeToGetMallocArraySize check because we return NULL when we don't know...
Victor Hernandez [Fri, 16 Oct 2009 18:08:17 +0000 (18:08 +0000)]
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

15 years agoInvert isSafeToGetMallocArraySize check because we return NULL when we don't know...
Victor Hernandez [Fri, 16 Oct 2009 18:07:17 +0000 (18:07 +0000)]
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@84260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate from Cristina, llvm-gcc doesn't build on the SPARC version of solaris
Chris Lattner [Fri, 16 Oct 2009 16:30:58 +0000 (16:30 +0000)]
Update from Cristina, llvm-gcc doesn't build on the SPARC version of solaris
at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84258 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce triple in tests.
Daniel Dunbar [Fri, 16 Oct 2009 16:30:02 +0000 (16:30 +0000)]
Force triple in tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStrip trailing white space.
Duncan Sands [Fri, 16 Oct 2009 15:20:13 +0000 (15:20 +0000)]
Strip trailing white space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck that GVN performs this transform even if the calls
Duncan Sands [Fri, 16 Oct 2009 12:18:23 +0000 (12:18 +0000)]
Check that GVN performs this transform even if the calls
themselves are not marked readonly, but only the called
functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84253 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate CMake file.
Benjamin Kramer [Fri, 16 Oct 2009 10:29:08 +0000 (10:29 +0000)]
Update CMake file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84252 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCleaned up some code. No functionality change.
Sanjiv Gupta [Fri, 16 Oct 2009 08:58:34 +0000 (08:58 +0000)]
Cleaned up some code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoI am no spelling bee.
Evan Cheng [Fri, 16 Oct 2009 06:18:09 +0000 (06:18 +0000)]
I am no spelling bee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84250 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable post-alloc scheduling for all ARM variants except for Thumb1.
Evan Cheng [Fri, 16 Oct 2009 06:11:08 +0000 (06:11 +0000)]
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

15 years agoIf post-alloc scheduler is not enabled, it should return false, not true.
Evan Cheng [Fri, 16 Oct 2009 06:10:34 +0000 (06:10 +0000)]
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

15 years agoIndent code.
Zhongxing Xu [Fri, 16 Oct 2009 05:42:28 +0000 (05:42 +0000)]
Indent code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84247 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd comment.
Evan Cheng [Fri, 16 Oct 2009 05:33:58 +0000 (05:33 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84246 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80 column violation.
Evan Cheng [Fri, 16 Oct 2009 05:18:39 +0000 (05:18 +0000)]
80 column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix more NEON instruction encodings.
Bob Wilson [Fri, 16 Oct 2009 03:58:44 +0000 (03:58 +0000)]
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

15 years agoAdd half precision floating point support (float16) to APFloat,
Chris Lattner [Fri, 16 Oct 2009 02:13:51 +0000 (02:13 +0000)]
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

15 years agoadd haiku support, patch by Paul Davey!
Chris Lattner [Fri, 16 Oct 2009 02:06:30 +0000 (02:06 +0000)]
add haiku support, patch by Paul Davey!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMC: Set symbol values in MachO MCStreamer.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:23 +0000 (01:58 +0000)]
MC: Set symbol values in MachO MCStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor formatting tweaks.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:15 +0000 (01:58 +0000)]
Minor formatting tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84235 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMC: Switch assembler API to using MCExpr instead of MCValue.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:03 +0000 (01:58 +0000)]
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

15 years agoMC: Remove unneeded context argument to MCExpr::Evaluate*.
Daniel Dunbar [Fri, 16 Oct 2009 01:57:52 +0000 (01:57 +0000)]
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

15 years agoMC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
Daniel Dunbar [Fri, 16 Oct 2009 01:57:39 +0000 (01:57 +0000)]
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

15 years agoMC: When parsing a variable reference, substitute absolute variables immediately
Daniel Dunbar [Fri, 16 Oct 2009 01:34:54 +0000 (01:34 +0000)]
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

15 years agoMC: Move assembler variable values from MCContext to MCSymbol.
Daniel Dunbar [Fri, 16 Oct 2009 01:33:57 +0000 (01:33 +0000)]
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

15 years agoMC: Switch MCContext value table to storing MCExprs.
Daniel Dunbar [Fri, 16 Oct 2009 01:33:11 +0000 (01:33 +0000)]
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

15 years agoWhen checking aliases between phi sources and V2, we know the sources are not themsel...
Evan Cheng [Fri, 16 Oct 2009 00:33:09 +0000 (00:33 +0000)]
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

15 years agoRevert svn r80498 and replace it with a different solution. The only problem
Bob Wilson [Thu, 15 Oct 2009 23:12:05 +0000 (23:12 +0000)]
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

15 years agoDllexport stuff cleanup:
Anton Korobeynikov [Thu, 15 Oct 2009 22:36:18 +0000 (22:36 +0000)]
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

15 years agoBranches must be the last instruction in a Thumb2 IT block. Approved by Evan Cheng.
Sandeep Patel [Thu, 15 Oct 2009 22:25:32 +0000 (22:25 +0000)]
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

15 years agoFix encoding bits for N3VLInt3_QHS multiclass with 8-bit elements.
Bob Wilson [Thu, 15 Oct 2009 21:57:47 +0000 (21:57 +0000)]
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

15 years agoFix ARM memory operand parsing of post indexing with just a base register, that
Kevin Enderby [Thu, 15 Oct 2009 21:42:45 +0000 (21:42 +0000)]
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

15 years agoFix a potential performance problem in placing ARM constant pools.
Bob Wilson [Thu, 15 Oct 2009 20:49:47 +0000 (20:49 +0000)]
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

15 years agoMore bits of the ARM target assembler for llvm-mc, code added to parse labels
Kevin Enderby [Thu, 15 Oct 2009 20:48:48 +0000 (20:48 +0000)]
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

15 years agoRemove X86Subtarget::IsLinux. It's no longer being used.
Evan Cheng [Thu, 15 Oct 2009 20:23:21 +0000 (20:23 +0000)]
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

15 years agoFix bug where array malloc with unexpected computation of the size argument resulted...
Victor Hernandez [Thu, 15 Oct 2009 20:14:52 +0000 (20:14 +0000)]
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

15 years agoAdd files Sanjiv forgot.
Benjamin Kramer [Thu, 15 Oct 2009 19:46:34 +0000 (19:46 +0000)]
Add files Sanjiv forgot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-apply 84180 with the fixed test case.
Sanjiv Gupta [Thu, 15 Oct 2009 19:26:25 +0000 (19:26 +0000)]
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

15 years agoMove Blackfin intrinsics into the Target/Blackfin directory.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:50:52 +0000 (18:50 +0000)]
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

15 years agoReport errors correctly for unselected target intrinsics.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:50:03 +0000 (18:50 +0000)]
Report errors correctly for unselected target intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up TargetIntrinsicInfo API. Add pure virtual methods.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:49:26 +0000 (18:49 +0000)]
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

15 years agoAdd missing break statements! Thanks to Duncan Sands for pointing this out!
Nick Lewycky [Thu, 15 Oct 2009 18:48:58 +0000 (18:48 +0000)]
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

15 years agoTablegen target intrinsics from the target main .td file.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:48:47 +0000 (18:48 +0000)]
Tablegen target intrinsics from the target main .td file.

Fix pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable another unittest that doesn't work on arm and ppc.
Benjamin Kramer [Thu, 15 Oct 2009 16:49:16 +0000 (16:49 +0000)]
Disable another unittest that doesn't work on arm and ppc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84186 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert "Complete Rewrite of AsmPrinter, TargetObjectFile based on new
Daniel Dunbar [Thu, 15 Oct 2009 15:02:14 +0000 (15:02 +0000)]
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

15 years agoComplete Rewrite of AsmPrinter, TargetObjectFile based on new PIC16Section class
Sanjiv Gupta [Thu, 15 Oct 2009 10:10:43 +0000 (10:10 +0000)]
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

15 years agoFew changes to comply with new DebugInfo Metadata representation.
Sanjiv Gupta [Thu, 15 Oct 2009 09:48:25 +0000 (09:48 +0000)]
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

15 years agoThe gcc plugin is now called dragonegg.so and no longer llvm.so.
Duncan Sands [Thu, 15 Oct 2009 08:17:44 +0000 (08:17 +0000)]
The gcc plugin is now called dragonegg.so and no longer llvm.so.
Pointed out by Gabor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84177 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach basicaa about memcpy/memmove/memset. The length argument can be used to
Nick Lewycky [Thu, 15 Oct 2009 07:11:24 +0000 (07:11 +0000)]
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

15 years agoTeach BasicAA to use the size parameter of the memory use marker intrinsics.
Nick Lewycky [Thu, 15 Oct 2009 06:12:11 +0000 (06:12 +0000)]
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

15 years agoBe smarter about reusing constant pool entries.
Bob Wilson [Thu, 15 Oct 2009 05:52:29 +0000 (05:52 +0000)]
Be smarter about reusing constant pool entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84173 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix another problem with ARM constant pools. Radar 7303551.
Bob Wilson [Thu, 15 Oct 2009 05:10:36 +0000 (05:10 +0000)]
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

15 years agoonly try to fold constantexpr operands when the worklist is first populated,
Chris Lattner [Thu, 15 Oct 2009 04:59:28 +0000 (04:59 +0000)]
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

15 years agodon't bother calling ConstantFoldInstruction unless there is a use of the
Chris Lattner [Thu, 15 Oct 2009 04:13:44 +0000 (04:13 +0000)]
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