add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.
llvm-svn: 34053
Always rename, never give a redef error. We could check for collapsed type
planes and generate an error if that's not the cause, but the 99.9999
percentile case will be that its the result of collapsed type planes. So,
rather than doing an expensive check, just rename.
llvm-svn: 34047
Some changes to get the smbd.ll test case working:
1. Move the logic for CSRETCC->sret attribute out of the ResolveDefinitions
code and into getExistingValue. This resolves it much earlier and works
in function scope as well.
2. Fix handling of CSRETCC->sret for the store instruction.
3. Rewrite the code for handling renaming to factor in linkage types.
4. Rename a structure filed for a PATypeInfo* so it doesn't get confused
with a field for a Type*.
llvm-svn: 34043
The code sequence before the spiller is something like:
= tMOVrr
%reg1117 = tMOVrr
%reg1078 = tLSLri %reg1117, 2
The it starts spilling:
%r0 = tRestore <fi#5>, 0
%r1 = tRestore <fi#7>, 0
%r1 = tMOVrr %r1<kill>
tSpill %r1, <fi#5>, 0
%reg1078 = tLSLri %reg1117, 2
It restores the value while processing the first tMOVrr. At this point, the
spiller remembers fi#5 is available in %r0. Next it processes the second move.
It restores the source before the move and spills the result afterwards. The
move becomes a noop and is deleted. However, a spill has been inserted and that
should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5.
Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0.
llvm-svn: 34039
definition of it into the CodeGen library. This is so that a backend doesn't
necessarily add in these writers if it doesn't use them (like in the lli
program).
llvm-svn: 34034
do some common stuff, then on our own add an object file writer (by calling
a concrete function), and then do some finishing stuff, if need be.
llvm-svn: 34032
allows us to split that method into two so that we can optionally call a
concrete function to add a writer. Removed moribund addObjectWriter()
method.
llvm-svn: 34030
Allow @ before identifer names. Recognize the i1, i8, i16, i32, i64 keywords
as type names corresponding to bool, ubyte, ushort, uint, and ulong
respectively. While these aren't LLVM 1.9 constructs, permitting the syntax
allows post-1.9 assembly files to be upgraded.
llvm-svn: 34023
api's look like this:
ModuleProvider *getBytecodeModuleProvider(
const std::string &Filename, ///< Name of file to be read
BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
std::string* ErrMsg = 0, ///< Optional error message holder
BytecodeHandler* H = 0 ///< Optional handler for reader events
);
This is ugly, but allows a client to say:
getBytecodeModuleProvider("foo", 0);
If they do this, there is no dependency on the compression libraries, saving
codesize.
llvm-svn: 34012
This happened because deadargelim now causes VMCore to auto-rename every
function that it hacks arguments out of. Because it hacks arguments out of
functions in a non-deterministic order, this caused the resultant numbering
to be nondet. The fix is to just be careful to not rename functions!
llvm-svn: 34005
"clean" target item. This gets around having the built sources disappear
when only one build mode wants to be cleaned. With the "clean-all" target,
all build modes are cleaned so it also makes sense to clean out the built
sources at that point.
llvm-svn: 34003