Commit Graph

70367 Commits

Author SHA1 Message Date
Chris Lattner 13b8b56dd4 this is done.
llvm-svn: 85041
2009-10-25 06:17:51 +00:00
Chris Lattner d8e8fb4d64 Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>.
This allows us to simplify this:
union vec2d {
    double e[2];
    double v __attribute__((vector_size(16)));
};
typedef union vec2d vec2d;

static vec2d a={{1,2}}, b={{3,4}};
    
vec2d foo () {
    return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v };
}

down to:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double 1.600000e+01, 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double 2.200000e+01, 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}

instead of:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 0), 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 1), 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}

llvm-svn: 85040
2009-10-25 06:15:37 +00:00
Chris Lattner 9d051246eb move FoldBitCast earlier in the file, and use it instead of
ConstantExpr::getBitCast in various places.

llvm-svn: 85039
2009-10-25 06:08:26 +00:00
Chris Lattner c5fd5ad4aa refactor FoldBitCast to reduce nesting and to always return a constantexpr
instead of returning null on failure.  No functionality change.

llvm-svn: 85038
2009-10-25 06:02:57 +00:00
Nick Lewycky 54d7179a25 Remove ICmpInst::isSignedPredicate which was a reimplementation
CmpInst::isSigned.

llvm-svn: 85037
2009-10-25 05:20:17 +00:00
Nick Lewycky 7494b3b1d4 Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
which is equal to !isTrueWhenEqual for ints but not for floats.

llvm-svn: 85036
2009-10-25 03:50:03 +00:00
Daniel Dunbar a4ea29e362 lit: Add --config-prefix option, to override default config file names.
llvm-svn: 85035
2009-10-25 03:30:55 +00:00
Nick Lewycky efd3e907b4 Indent.
llvm-svn: 85034
2009-10-25 03:22:00 +00:00
Nate Begeman e46ee9aaea Add support for vector shifts, pretty straight forward.
llvm-svn: 85033
2009-10-25 02:26:48 +00:00
Nate Begeman b8326be4d9 Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
If I can find it again, I will check in a testcase.

llvm-svn: 85032
2009-10-25 02:26:01 +00:00
Mikhail Glushenkov 964020b8ba Regenerate.
llvm-svn: 85031
2009-10-25 01:44:24 +00:00
Mikhail Glushenkov a51c491f03 Document OptionPreprocessor.
llvm-svn: 85030
2009-10-25 01:44:11 +00:00
Mikhail Glushenkov 9b291a0862 Add a test for OptionPreprocessor.
llvm-svn: 85029
2009-10-25 01:43:50 +00:00
Daniel Dunbar 768251875c lit: Allow use of /dev/null in redirects on Windows (replace by a temporary
file).

llvm-svn: 85028
2009-10-25 01:37:26 +00:00
Jim Grosbach 5027d359e7 When the scavenger is looking for a good candidate location to restore from a
spill, it should avoid doing so inside the live range of a virtual register.

llvm-svn: 85026
2009-10-25 00:45:07 +00:00
Dan Gohman 7f2413f18b Update these tests to match what Loop::print now prints.
llvm-svn: 85021
2009-10-24 23:52:07 +00:00
Dan Gohman ef41a1ce3c MapValue doesn't needs its LLVMContext argument.
llvm-svn: 85020
2009-10-24 23:37:16 +00:00
Dan Gohman 8f4078ba39 Rename isLoopExit to isLoopExiting, for consistency with the wording
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.

llvm-svn: 85019
2009-10-24 23:34:26 +00:00
Dan Gohman e155f8646c Delete a spurious semicolon.
llvm-svn: 85018
2009-10-24 23:24:45 +00:00
Dan Gohman a484d17ec5 Make these tests more interesting by using
-verify-dom-info and -verify-loop-info, which enable additional
(expensive) consistency checks.

llvm-svn: 85017
2009-10-24 23:23:04 +00:00
Dan Gohman b979794e4b Rewrite LoopRotation's SSA updating code using SSAUpdater.
llvm-svn: 85016
2009-10-24 23:19:52 +00:00
Daniel Dunbar 841fa8e289 Fix cmake failure trying to get SVN info for non-SVN trees.
llvm-svn: 85015
2009-10-24 20:32:58 +00:00
Daniel Dunbar 75a9d64041 lit: Support '>>' redirections when executing scripts internally.
llvm-svn: 85014
2009-10-24 20:32:49 +00:00
Daniel Dunbar d8358b9db6 Update CMake dependencies.
llvm-svn: 85013
2009-10-24 20:32:43 +00:00
Daniel Dunbar c9c49bde3b Teach macho-dump to dump UUIDs.
llvm-svn: 85012
2009-10-24 20:32:36 +00:00
Dan Gohman 2cbca4e229 Make DominanceFrontierBase::print's output prettier.
llvm-svn: 85011
2009-10-24 20:01:11 +00:00
Dan Gohman afbf256184 Make DominanceFrontier::addBasicBlock return the iterator for the newly
inserted block.

llvm-svn: 85010
2009-10-24 19:57:58 +00:00
Dan Gohman 8cd7c22527 Add an explicit keyword.
llvm-svn: 85009
2009-10-24 19:56:23 +00:00
Sanjiv Gupta 9e8d42f295 Revert back 85006 for now as it breaks PIC16 tests.
llvm-svn: 85008
2009-10-24 18:19:41 +00:00
Sanjiv Gupta 84f0f776e9 Add a preprocessor define for adding a "near" section attribute for allowing
objects to be placed at shared memory.

llvm-svn: 85007
2009-10-24 18:08:20 +00:00
Sanjiv Gupta 055c3305a1 Adding support for placing global objects in shared data memory.
llvm-svn: 85006
2009-10-24 18:02:44 +00:00
Benjamin Kramer 3f81d655d7 Remove duplicated constructor declaration.
llvm-svn: 84997
2009-10-24 10:09:11 +00:00
Benjamin Kramer 1402ce3e42 Switch alloca/sprintf to SmallString/raw_ostream.
llvm-svn: 84996
2009-10-24 09:57:09 +00:00
John McCall 703a3f8a7b Preserve type source information in TypedefDecls. Preserve it across
template instantiation.  Preserve it through PCH.  Show it off to the indexer.

I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.

llvm-svn: 84994
2009-10-24 08:00:42 +00:00
Chris Lattner 3db7bd27c2 various cleanups suggested by Duncan
llvm-svn: 84993
2009-10-24 05:27:19 +00:00
Chris Lattner 9e2d5b3b8e fix PR5287, a serious regression from my previous patches. Thanks to
Duncan for the nice tiny testcase.

llvm-svn: 84992
2009-10-24 05:22:15 +00:00
Douglas Gregor d33198420d Fix overload resolution when calling a member template or taking the
address of a member template when explicit template arguments are
provided.

llvm-svn: 84991
2009-10-24 04:59:53 +00:00
Victor Hernandez e297149e26 Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.

llvm-svn: 84987
2009-10-24 04:23:03 +00:00
Evan Cheng 46ed1f8341 80 col violation.
llvm-svn: 84986
2009-10-24 02:07:42 +00:00
Anton Korobeynikov b4a1347be2 Add some asserts to catch copyRegToReg() fails early
llvm-svn: 84983
2009-10-24 00:27:00 +00:00
Jim Grosbach e2871d69db Restrict Thumb1 register allocation to low registers, even for instructions that
can access the hi regs. Our prologue and epilogue code doesn't know how to
properly handle save/restore of the hi regs, so things go badly when we alloc
them.

llvm-svn: 84982
2009-10-24 00:19:24 +00:00
Fariborz Jahanian aa9894c583 Make the local buffer overflow safe.
llvm-svn: 84981
2009-10-24 00:16:42 +00:00
Fariborz Jahanian 205baf61c4 Fixe a buffer overflow problem which causes a crash
in a certain project. Need to have a permananent fix later
(FIXME added).

llvm-svn: 84980
2009-10-23 23:55:43 +00:00
Douglas Gregor 6b815c8799 Implement template instantiation for non-type template
parameters. Fixes PR5103.

llvm-svn: 84979
2009-10-23 23:25:44 +00:00
Evan Cheng d638bc310a Identity copies should not contribute to spill weight.
llvm-svn: 84978
2009-10-23 23:09:19 +00:00
Jim Grosbach 22b2c011f9 FIXME no longer applies. R12 and R3 are available for allocation
llvm-svn: 84977
2009-10-23 23:07:42 +00:00
John McCall 48f2d5860d Store the builtin types as CanQualTypes. Expand a bit on the CanQual API,
but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.

llvm-svn: 84976
2009-10-23 23:03:21 +00:00
Jeffrey Yasskin d0fc8f809a Fix http://llvm.org/PR4822: allow module deletion after a function has been
compiled.

When functions are compiled, they accumulate references in the JITResolver's
stub maps. This patch removes those references when the functions are
destroyed.  It's illegal to destroy a Function when any thread may still try to
call its machine code.

This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs
and fixes a couple "do stuff inside assert()" bugs from r84522.

llvm-svn: 84975
2009-10-23 22:37:43 +00:00
Douglas Gregor 091f04256a Migrate Sema::ActOnCallExpr to Sema::FixOverloadedFunctionReference,
so that we maintain better source information after template argument
deduction and overloading resolves down to a specific
declaration. Found and dealt with a few more cases that 
FixOverloadedFunctionReference didn't cope with.

(Finally) added a test case that puts together this change with the
DeclRefExpr change to (optionally) include nested-name-specifiers and
explicit template argument lists.

llvm-svn: 84974
2009-10-23 22:18:25 +00:00
Sebastian Redl e2530ec0c0 Correct a comment.
llvm-svn: 84973
2009-10-23 22:13:42 +00:00