| Commit message (Collapse) | Author | Age | Files | Lines | 
| ... |  | 
| | 
| 
| 
| 
| 
|  | 
Fix a subtle iterator invalidation bug I introduced in the last commit.
llvm-svn: 60258
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
an entry in the nonlocal deps map, don't reset entries
referencing that instruction to [dirty, null], instead, set
them to [dirty,next] where next is the instruction after the
deleted one.  Use this information in the non-local deps
code to avoid rescanning entire blocks.
This speeds up GVN slightly by avoiding pointless work.  On
403.gcc this makes GVN 1.5% faster. 
llvm-svn: 60256
 | 
| | 
| 
| 
| 
| 
| 
|  | 
a smallvector instead of a DenseMap.  This speeds up GVN by 5%
on 403.gcc.
llvm-svn: 60255
 | 
| | 
| 
| 
| 
| 
|  | 
no functionality/code change.
llvm-svn: 60254
 | 
| | 
| 
| 
| 
| 
| 
|  | 
formulation that is faster and doesn't require nonLazyHelper.
Much less code.
llvm-svn: 60253
 | 
| | 
| 
| 
|  | 
llvm-svn: 60242
 | 
| | 
| 
| 
|  | 
llvm-svn: 60241
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Put a some code back to handle buggy behavior that GVN expects: it wants
loads to depend on each other, and accesses to depend on their allocations.
llvm-svn: 60240
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Use getTypeStoreSize instead of ABITypeSize for in-memory size
in a couple places.
llvm-svn: 60238
 | 
| | 
| 
| 
| 
| 
| 
|  | 
former does caching, the later doesn't.  This dramatically simplifies
the logic in getDependency and getDependencyFrom.
llvm-svn: 60234
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Document the Dirty value more precisely, use it for the uninitialized
DepResultTy value.  Change reverse mappings to be from an instruction*
instead of DepResultTy, and stop tracking other forms.  This makes it more
clear that we only care about the instruction cases.
Eliminate a DepResultTy,bool pair by using Dirty in the local case as well,
shrinking the map and simplifying the code.
This speeds up GVN by ~3% on 403.gcc.
llvm-svn: 60232
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
query.  This makes it crystal clear what cases can escape from MemDep that
the clients have to handle.  This also gives the clients a nice simplified
interface to it that is easy to poke at.
This patch also makes DepResultTy and MemoryDependenceAnalysis::DepType
private, yay.
llvm-svn: 60231
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
of a pointer/int pair instead of a manually bitmangled pointer.
This forces clients to think a little more about checking the 
appropriate pieces and will be useful for internal 
implementation improvements later.
I'm not particularly happy with this.  After going through this
I don't think that the clients of memdep should be exposed to
the internal type at all.  I'll fix this in a subsequent commit.
This has no functionality change.
llvm-svn: 60230
 | 
| | 
| 
| 
| 
| 
| 
|  | 
properly updates the reverse dependency map when it installs updated 
dependencies for instructions that depend on the removed instruction.
llvm-svn: 60222
 | 
| | 
| 
| 
| 
| 
|  | 
no functionality change.
llvm-svn: 60219
 | 
| | 
| 
| 
|  | 
llvm-svn: 60218
 | 
| | 
| 
| 
| 
| 
|  | 
This shows the root problem behind PR3141.
llvm-svn: 60216
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
but it doesn't make any sense at all.
Also make the method const, private, and fit in 80 cols while we're at it.
llvm-svn: 60215
 | 
| | 
| 
| 
|  | 
llvm-svn: 60211
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
value. It must now be as if the pointer were allocated and has not escaped to
the caller. Thanks to Dan Gohman for pointing out the error in the original
and helping devise this definition.
llvm-svn: 59940
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).
No changes to the bitcode reader/writer, asm printer or verifier were needed.
llvm-svn: 59934
 | 
| | 
| 
| 
| 
| 
|  | 
arbitrary integer width for the count.
llvm-svn: 59823
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
llvm-svn: 59809
 | 
| | 
| 
| 
|  | 
llvm-svn: 59802
 | 
| | 
| 
| 
|  | 
llvm-svn: 59705
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Use it to safely handle less-than-or-equals-to exit conditions in loops. These
also occur when the loop exit branch is exit on true because SCEV inverses the
icmp predicate.
Use it again to handle non-zero strides, but only with an unsigned comparison
in the exit condition.
llvm-svn: 59528
 | 
| | 
| 
| 
|  | 
llvm-svn: 59515
 | 
| | 
| 
| 
| 
| 
| 
|  | 
If this patch causes a performance regression for anyone, please let me know,
and it can be fixed in a different way with much more effort.
llvm-svn: 59384
 | 
| | 
| 
| 
|  | 
llvm-svn: 59064
 | 
| | 
| 
| 
| 
| 
| 
|  | 
implementation detail of DIFactory anyway, and this allows it to avoid
recomputing the same type over and over.
llvm-svn: 58960
 | 
| | 
| 
| 
|  | 
llvm-svn: 58955
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
information.  This logically replaces the "Desc" classes in
MachineModuleInfo.  Nice features of these classes are that they:
1. Are much more efficient than MMI because they don't create a 
   temporary parallel data structure for debug info that has to be
   'serialized' and 'deserialized' into/out of the module.
2. These provide a much cleaner abstraction for debug info than 
   MMI, which will make it easier to change the implementation in 
   the future (to be MDNode-based).
3. These are much easier to use than the MMI interfaces, requiring
   a lot less code in the front-ends.
4. These can be used to both create (for frontends) and read (for
   codegen) debug information.  DebugInfoBuilder can only be used
   to create the nodes.
So far, this is implemented just enough to support the debug info
generation needs of clang.  This can and should be extended to 
support the full set of debug info constructs, and we should switch
llvm-gcc and llc over to using this in the near future.
This code also has a ton of FIXMEs in it, because the way we 
currently represent debug info in LLVM IR is basically insane in a
variety of details.  This sort of issue should be fixed when we
eventually reimplement debug info on top of MDNodes.
llvm-svn: 58954
 | 
| | 
| 
| 
| 
| 
|  | 
We're still waiting on code that actually analyzes them properly.
llvm-svn: 58592
 | 
| | 
| 
| 
|  | 
llvm-svn: 58296
 | 
| | 
| 
| 
| 
| 
|  | 
If it is not part of a loop it is obviously invariant wrt to all loops.
llvm-svn: 58240
 | 
| | 
| 
| 
|  | 
llvm-svn: 58075
 | 
| | 
| 
| 
|  | 
llvm-svn: 57649
 | 
| | 
| 
| 
| 
| 
|  | 
warning on x86-64 with gcc-4.3.
llvm-svn: 57634
 | 
| | 
| 
| 
|  | 
llvm-svn: 57433
 | 
| | 
| 
| 
| 
| 
| 
|  | 
returned by BinomialCoefficient and don't try to operate with them. This
replaces the previous fix for PR2857.
llvm-svn: 57431
 | 
| | 
| 
| 
|  | 
llvm-svn: 57413
 | 
| | 
| 
| 
|  | 
llvm-svn: 57412
 | 
| | 
| 
| 
|  | 
llvm-svn: 57408
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
escapes into
data-based ones.  Just be conservative when analyzing control-based escapes.
llvm-svn: 57400
 | 
| | 
| 
| 
|  | 
llvm-svn: 57357
 | 
| | 
| 
| 
| 
| 
|  | 
tested yet, but feedback is welcome.
llvm-svn: 57342
 | 
| | 
| 
| 
| 
| 
|  | 
implementing folding. Fixes PR2857.
llvm-svn: 57049
 | 
| | 
| 
| 
| 
| 
|  | 
Why?  Because it was there!
llvm-svn: 56996
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject.  The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
 | 
| | 
| 
| 
|  | 
llvm-svn: 56513
 |