* Print floating point values using C99 hexadecimal style FP if possible.
This increases the number of floating point constants that may be emitted
inline, and improves precision for global variable initializers which
can not be emitted in integer form.
This fixes the Olden/Power benchmark with the CBE!!!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9052 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix isFPCSafeToPrint to find more constants safe to print, which it was
failing because ftostr was padding with leading space characters.
* Scan the entire module for global constants instead of each function at a
time. This has the advantage of allowing us to emit constants at global
scope instead of function scope. This speeds FP programs quite a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9048 91177308-0d34-0410-b5e6-96231b3b80d8
Linux. This is consistent with what FreeBSD and Solaris both want.
This makes the JIT work on FreeBSD 5.1-RELEASE. Whee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9045 91177308-0d34-0410-b5e6-96231b3b80d8
In lookupFunction():
Change to use "F" for Function argument instead of ancient "M".
Remove commented-out code.
Change to use GetAddressOfSymbol instead of dlsym.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9013 91177308-0d34-0410-b5e6-96231b3b80d8
are ordered by name, not by slot, so the previous solution wasn't any good.
On a large testcase, this reduces time to parse from 2.17s to 1.58s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9002 91177308-0d34-0410-b5e6-96231b3b80d8
changes:
* BytecodeReader::getType(...) used to return a null pointer
on error. This was only checked about half the time. Now we convert
it to throw an exception, and delete the half that checked for error.
This was checked in before, but psmith crashed and lost the change :(
* insertValue no longer returns -1 on error, so callers don't need to
check for it.
* Substantial rewrite of InstructionReader.cpp, to use more efficient,
simpler, data structures. This provides another 5% speedup. This also
makes the code much easier to read and understand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8984 91177308-0d34-0410-b5e6-96231b3b80d8
simplifies the control flow a bit. This provides a small (~3%) speedup,
but it's primarily a cleanup exercise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8983 91177308-0d34-0410-b5e6-96231b3b80d8
new, simpler, ForwardReferences data structure. This is just the first
simple replacement, subsequent changes will improve the code more.
This simple change improves the performance of loading a file from HDF5
(contributed by Bill) from 2.36s to 1.93s, a 22% improvement. This
presumably has to do with the fact that we only create ONE placeholder for
a particular forward referenced values, and also may be because the data
structure is much simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8979 91177308-0d34-0410-b5e6-96231b3b80d8
in the bytecode parser. Before we tried to shoehorn basic blocks into the
"getValue" code path with other types of values. For a variety of reasons
this was a bad idea, so this patch separates it out into its own data structure.
This simplifies the code, makes it fit in 80 columns, and is also much faster.
In a testcase provided by Bill, which has lots of PHI nodes, this patch speeds
up bytecode parsing from taking 6.9s to taking 2.32s. More speedups to
follow later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8977 91177308-0d34-0410-b5e6-96231b3b80d8
to avoid reprocessing PHI nodes needlessly. This speeds up the big bad PHI
testcase 43%: from 104.9826 to 73.5157s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8964 91177308-0d34-0410-b5e6-96231b3b80d8
of a test that Bill Wendling sent me from 228.5s to 105s. Obviously there is
more improvement to be had, but this is a nice speedup which should be "felt"
by many programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8962 91177308-0d34-0410-b5e6-96231b3b80d8
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:
if (const unsigned* AS = TID.ImplicitDefs) {
for (int i = 0; AS[i]; ++i) {
// use AS[i]
}
}
was changed to:
for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
// use *AS
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8960 91177308-0d34-0410-b5e6-96231b3b80d8