(2) Detect LLVMDIR using the LEVEL variable in Makefile.
(3) To perform #2 propertly, use the same Makefile search rules as gmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7228 91177308-0d34-0410-b5e6-96231b3b80d8
This test helps to see if the optimization correctly handles variables that
are declared constant and external.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7215 91177308-0d34-0410-b5e6-96231b3b80d8
x86 or Sparc, LLC will automatically default to that platform, no guessing
required. On another platform, it will default to `noarch' and will have to
guess which architecture to compile to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7207 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic
call which causes llc & lli to core-dump.
Add a sort-of treatment of cast double to ulong. I am not really sure
what a user should expect to see upon casting a negative FP value to
unsigned long long. But with what is given here, I was able to write
a program that could cast -123.456 to ulong and back and get -123.0,
which seems like a step in the right direction. GCC seems to give you
0. I don't know if I'd consider that useful.
These cases were coming up in GNU coreutils-5.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7205 91177308-0d34-0410-b5e6-96231b3b80d8
to pass to dlsym() -- Linux/x86 wants 0 while Sparc/Solaris wants RTLD_SELF,
which is not zero. Thanks to Chris for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7204 91177308-0d34-0410-b5e6-96231b3b80d8
an external constant. Since external constants don't have initializers, we
were failing on an assert() call in llvm/GlobalVariable.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7193 91177308-0d34-0410-b5e6-96231b3b80d8
to clone the subgraph reachable from a set of root nodes, into the
current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
track which globals have been inlined into the current graph from
callers or callees. In the TD pass, such globals are up-to-date and
do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
when cloning nodes into the globals graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7190 91177308-0d34-0410-b5e6-96231b3b80d8
after all callees are inlined into the current graph.
NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp,
which ensures that resolvable indirect calls are not moved out to the
globals graph, so that they are eventually inlined (if possible).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7189 91177308-0d34-0410-b5e6-96231b3b80d8
after all callers are inlined into the current graph.
(2) Optimize the way a graph is inlined into its callees in the TD phase:
(a) Use DSGraph::cloneReachableSubgraph to clone only a subgraph at
each call site, for faster inlining.
(b) Clone separately for the same callee at different call sites,
since only the reachable subgraph is being cloned, not the entire
caller graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7188 91177308-0d34-0410-b5e6-96231b3b80d8
and (2) faster inlining by cloning only reachable nodes. In particular:
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
current graph, merging the global nodes into thos in the current graph.
The TD pass now uses this for faster inlining, and so does the
next function.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
globals graph into the current graph in both BU and TD passes.
(3) `I' flags are removed from all nodes in the globals graph, because they
are difficult to maintain correctly and are not needed anyway.
(4) Aux. function calls are only removed to the globals graph if they
will never be resovled. (This is what fixed gap.) The immediate
reason is that if we took these out of a function (and moved them to
the globals graph) we would need to rematerialize these nodes into the
function graph for every function in the BU pass. The longer term
problem is that we would need to find a way to remove them from the
globals graph iff they have been resolved on all paths through the
call graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7187 91177308-0d34-0410-b5e6-96231b3b80d8
isUnresolvableFunc() (I thought I needed this externally.
I don't, but it's still nicer this way.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7186 91177308-0d34-0410-b5e6-96231b3b80d8
now works in instructions which require a 2-bit or 3-bit INTcc code.
Incidentally, that means that the representation of INTcc registers is now the
same in both integer and FP instructions. Thus, code became much simpler and
cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7185 91177308-0d34-0410-b5e6-96231b3b80d8
up builds a little bit since it will prevent GNU make from matching these
phony targets against implicit rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7183 91177308-0d34-0410-b5e6-96231b3b80d8
Also, placed DEBUG() guards around debug information so that the generated file
is much smaller and hence should be faster to preprocess/compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7180 91177308-0d34-0410-b5e6-96231b3b80d8
masking and shifting operands directly into their place in the instruction,
instead of the old-fashioned way of ORing in each bit separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7179 91177308-0d34-0410-b5e6-96231b3b80d8
allow, i.e. make a sequence of instructions to enable an indirect call using
jump-and-link and 2 temporary registers (which we save and ultimately restore).
Warning: if the delay slot of a function call is used to do meaningful work and
not just a NOP, this behavior is incorrect. However, the Sparc backend does not
yet utilize the delay slots effectively, so it is not necessary to make an
overly complicated algorithm for something that's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7178 91177308-0d34-0410-b5e6-96231b3b80d8
* FP double registers are now coded correctly
* Removed function which converted registers based on register types, it was
broken (because regTypes are broken)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7175 91177308-0d34-0410-b5e6-96231b3b80d8
Specifically, this updates libtool to version 1.5 and adds the following:
- Added the -only-static option that we added in our previous libtool.
- Modified the autoconf macros so that libtool uses the -G option when
linking on Solaris. This allows libraries with global variables with
constructors to automatically run those constructors when the
library is dlopened().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7171 91177308-0d34-0410-b5e6-96231b3b80d8
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7169 91177308-0d34-0410-b5e6-96231b3b80d8