Gabor Greif
9a8e64c76f
Give sentinel traits the right to determine the policy where the sentinel is kept.
...
This should result in less indirect memory accesses, less dead writes and tighter code.
llvm-svn: 66061
2009-03-04 20:36:44 +00:00
Gabor Greif
f8d2f7429d
"Ghostify" embedded sentinels. This is a real win in all cases
...
because less bytes are allocated and subobject construction is gone.
For reference how it works, see BasicBlock.h.
Btw. it is very assuring to see that somebody has invented
this ilist-embedded sentinel technique before me :-)
llvm-svn: 66026
2009-03-04 06:57:48 +00:00
Dale Johannesen
b26bc461f0
Temporarily revert 65975, which breaks the llvm-gcc build.
...
While the patch is clearly correct in itself, it's become
apparent other places are assuming debug intrinsics are
marked as touching memory...this needs more testing.
llvm-svn: 65992
2009-03-04 01:14:28 +00:00
Devang Patel
dd0b382f55
Dbg Intrinsics do not access memory.
...
llvm-svn: 65975
2009-03-03 22:33:54 +00:00
Dan Gohman
cf43db79cc
Make a comment less terse.
...
llvm-svn: 65953
2009-03-03 17:44:54 +00:00
Dan Gohman
51d4e8db6a
Fix a bunch of Doxygen syntax issues. Escape special characters,
...
and put @file directives on their own comment line.
llvm-svn: 65920
2009-03-03 02:55:14 +00:00
Dale Johannesen
33fa9dc8a9
When sinking an insn in InstCombine bring its debug
...
info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).
llvm-svn: 65910
2009-03-03 01:09:07 +00:00
Bob Wilson
5b276b6bc9
Generalize BuildVectorSDNode::isConstantSplat to use APInts and handle
...
arbitrary vector sizes. Add an optional MinSplatBits parameter to specify
a minimum for the splat element size. Update the PPC target to use the
revised interface.
llvm-svn: 65899
2009-03-02 23:24:16 +00:00
Gabor Greif
63c1d08d66
drop support for GCC 2.x as it is hopelessly broken anyway
...
llvm-svn: 65864
2009-03-02 19:49:29 +00:00
Gabor Greif
2b1114593e
Declare Sentinel fragments as mutable to get rid
...
of some pointless casting. This fragment logically
does not belong to ilist anyway, but to "ghostly"
NodeType.
llvm-svn: 65843
2009-03-02 14:47:45 +00:00
Gabor Greif
267542aaa5
remove a deprecated interface that was pretty useless
...
llvm-svn: 65842
2009-03-02 12:42:07 +00:00
Gabor Greif
f30dc30eea
fix typo
...
llvm-svn: 65839
2009-03-02 12:10:56 +00:00
Mikhail Glushenkov
3f2bbd6301
Move code from Main.cpp to the include dir.
...
User drivers based on llvmc must all share the initialization code.
Putting main() into libCompilerDriver is not a very good idea IMO (and ld gave
me some strange EH-related error anyway).
llvm-svn: 65825
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
6987e30144
Cosmetic fixes: include guards.
...
llvm-svn: 65824
2009-03-02 09:02:28 +00:00
Mikhail Glushenkov
0ce41a4c26
Plugin::Priority() doesn't need to be pure virtual.
...
llvm-svn: 65823
2009-03-02 09:02:01 +00:00
Mikhail Glushenkov
1a0ddf169b
Add a comment.
...
llvm-svn: 65822
2009-03-02 09:01:39 +00:00
Mikhail Glushenkov
3cde18e191
Reorganize llvmc code.
...
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.
Tested with objdir != srcdir.
llvm-svn: 65821
2009-03-02 09:01:14 +00:00
Gabor Greif
3f56efbf04
Another sentinel optimization. This one should always
...
be a win, since almost every interesting function has at least one Argument.
llvm-svn: 65778
2009-03-01 17:13:15 +00:00
Gabor Greif
dc34b050a2
Reuse a technique (pioneered for BasicBlocks) of superposing ilist with
...
its sentinel. This is quite a win when a function really has a basic block.
When the function is just a declaration (and stays so) the old way did not
allocate a sentinel. So this change is most beneficial when the ratio of
function definition to declaration is high. I.e. linkers etc. Incidentally
these are the most resource demanding applications, so I expect that the
reduced malloc traffic, locality and space savings outweigh the cost of
addition of two pointers to Function.
llvm-svn: 65776
2009-03-01 16:38:10 +00:00
Gabor Greif
9849b23219
fix a comment
...
llvm-svn: 65768
2009-03-01 09:45:52 +00:00
Gabor Greif
9b3fe3d625
Fix a typo. Thanks baldrick!
...
llvm-svn: 65767
2009-03-01 09:43:41 +00:00
Chris Lattner
0cefb564d4
simplify handling "don't print top level name" processing, so that we get
...
stuff like %A = type { %A*} instead of an upref.
llvm-svn: 65748
2009-03-01 01:16:21 +00:00
Bob Wilson
7482f84ae6
Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a new
...
method in a BuildVectorSDNode "pseudo-class".
llvm-svn: 65747
2009-03-01 01:13:55 +00:00
Chris Lattner
1a7eac8434
move type name population out of TypePrinting class into a static
...
AsmWriter.cpp method.
llvm-svn: 65736
2009-02-28 23:20:19 +00:00
Chris Lattner
2396ce476a
delete a bunch of duplicated type printing logic, using the type printing
...
stuff in AsmWriter.cpp for Type::getDescription().
llvm-svn: 65734
2009-02-28 23:01:57 +00:00
Gabor Greif
2def3e8ae7
add description how the ilist_traits<Instruction> works
...
llvm-svn: 65732
2009-02-28 22:46:37 +00:00
Chris Lattner
34181d9bcc
the module is not required to exist, allow it to default, giving this
...
class a nice default ctor.
llvm-svn: 65731
2009-02-28 22:41:33 +00:00
Chris Lattner
28f2b3c2a4
disable copying and assignment.
...
llvm-svn: 65730
2009-02-28 22:35:24 +00:00
Chris Lattner
03e16b833f
expose TypePrinting as a public API.
...
llvm-svn: 65729
2009-02-28 22:34:45 +00:00
Chris Lattner
f47615197e
Change WriteTypeSymbolic to not put a space out before types, also, remove
...
the old std::ostream version.
llvm-svn: 65720
2009-02-28 21:05:51 +00:00
Gabor Greif
5d9be2cffd
make traits more flexible by splitting out node-related fragment
...
llvm-svn: 65690
2009-02-28 10:17:32 +00:00
Evan Cheng
c26c11bbd0
Avoid unused parameter warning.
...
llvm-svn: 65670
2009-02-28 01:10:24 +00:00
Gabor Greif
078dabaf4a
group friendship
...
llvm-svn: 65633
2009-02-27 15:46:23 +00:00
Rafael Espindola
880e63bf01
Refactor TLS code and add some tests. The tests and expected results are:
...
pic | declaration | linkage | visibility |
!pic | declaration | external | default | tls1.ll tls2.ll | local exec
pic | declaration | external | default | tls1-pic.ll tls2-pic.ll | general dynamic
!pic | !declaration | external | default | tls3.ll tls4.ll | initial exec
pic | !declaration | external | default | tls3-pic.ll tls4-pic.ll | general dynamic
!pic | declaration | external | hidden | tls7.ll tls8.ll | local exec
pic | declaration | external | hidden | X | local dynamic
!pic | !declaration | external | hidden | tls9.ll tls10.ll | local exec
pic | !declaration | external | hidden | X | local dynamic
!pic | declaration | internal | default | tls5.ll tls6.ll | local exec
pic | declaration | internal | default | X | local dynamic
The ones marked with an X have not been implemented since local dynamic is not implemented.
llvm-svn: 65632
2009-02-27 13:37:18 +00:00
Gabor Greif
154b0b2765
fix comments
...
llvm-svn: 65627
2009-02-27 09:33:37 +00:00
Gabor Greif
9b51fe4ab1
Introduce a new technique for merging BasicBlock with Instruction sentinel by superposition.
...
This looks dangerous, but isn't because the sentinel is accessed in special way only,
namely the Next and Prev fields of it, and these are guaranteed to exist.
llvm-svn: 65626
2009-02-27 08:41:37 +00:00
Dan Gohman
04e61ee3b5
Make LoopInfo::print() identify header, exit, and latch blocks,
...
and print the loop depth.
llvm-svn: 65593
2009-02-27 00:05:54 +00:00
Gabor Greif
cd59854e1c
remove deleteNode definition, it is inherited in an identical fashion
...
llvm-svn: 65565
2009-02-26 19:37:54 +00:00
Evan Cheng
4014a9a5b8
ADDS{D|S}rr_Int and MULS{D|S}rr_Int are not commutable. The users of these intrinsics expect the high bits will not be modified.
...
llvm-svn: 65499
2009-02-26 03:12:02 +00:00
Bob Wilson
873bfcf34f
Fix a duplicated word in a comment.
...
llvm-svn: 65496
2009-02-26 00:58:09 +00:00
Evan Cheng
ec34226c2b
Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.
...
llvm-svn: 65482
2009-02-25 22:49:59 +00:00
Evan Cheng
befebff8fc
Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior.
...
This is a very minor compile time win.
llvm-svn: 65438
2009-02-25 07:04:34 +00:00
Scott Michel
3f273a8412
Expand tabs to spaces (overlooked in previous commit)
...
llvm-svn: 65427
2009-02-25 03:57:49 +00:00
Scott Michel
29d7559c09
Remove all "cached" data from BuildVectorSDNode, preferring to retrieve
...
results via reference parameters.
This patch also appears to fix Evan's reported problem supplied as a
reduced bugpoint test case.
llvm-svn: 65426
2009-02-25 03:12:50 +00:00
Mon P Wang
c9b4dab417
Added support to have TableGen provide information if an intrinsic (core
...
or target) can be overloaded or not.
llvm-svn: 65404
2009-02-24 23:17:49 +00:00
Dan Gohman
dd9c79d45b
Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount,
...
to more accurately describe what it does. Expand its doxygen comment
to describe what the backedge-taken count is and how it differs
from the actual iteration count of the loop. Adjust names and
comments in associated code accordingly.
llvm-svn: 65382
2009-02-24 18:55:53 +00:00
Bill Wendling
9d4eb136da
Overhaul my earlier submission due to feedback. It's a large patch, but most of
...
them are generic changes.
- Use the "fast" flag that's already being passed into the asm printers instead
of shoving it into the DwarfWriter.
- Instead of calling "MI->getParent()->getParent()" for every MI, set the
machine function when calling "runOnMachineFunction" in the asm printers.
llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Bill Wendling
0d8316c5e0
- Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
...
a DBG_LABEL or not. We want to fall back to the original way of emitting debug
info when we're in -O0/-fast mode.
- Add plumbing in to pass the "Fast" flag to places that need it.
- XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I
need to investigate still.
llvm-svn: 65367
2009-02-24 02:35:30 +00:00
Ted Kremenek
d5ea51e615
Correctly implement ImmutableMap::getMaxElement() by getting the actual <key, value> pair.
...
llvm-svn: 65327
2009-02-23 17:28:16 +00:00
Ted Kremenek
d8c425b68d
Add ImmutableMap::getMaxElement(), a method that returns the <key,value> pair in a ImmutableMap that has the highest ranked key.
...
llvm-svn: 65326
2009-02-23 17:27:18 +00:00