Commit Graph

40944 Commits

Author SHA1 Message Date
Devang Patel 2e622e4c2b If loop header is also loop exiting block then OrigPN is incoming value for B loop header.
Fixes PR 2030.

llvm-svn: 47141
2008-02-14 23:18:47 +00:00
Ted Kremenek 5b70a22656 When visualizing ExplodedNodes created by GRExprEngine, color nodes with
null-dereferences or bad control-flow red.

llvm-svn: 47140
2008-02-14 22:54:53 +00:00
Ted Kremenek 5d8bab7ecd Don't analyze functions when we have parse errors.
llvm-svn: 47139
2008-02-14 22:54:17 +00:00
Dan Gohman c354ebddd1 Fix a warning about comparison between signed and unsigned,
being consistent with the rest of the APInt implementation.

llvm-svn: 47138
2008-02-14 22:38:45 +00:00
Ted Kremenek d3122cb83c Renamed GRConstants => GRSimpleVals.
Moved driver logic for --grsimple to GRSimpleVals.cpp.

llvm-svn: 47137
2008-02-14 22:36:46 +00:00
Ted Kremenek bd8957b6b2 #include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine to
clang namespace.

llvm-svn: 47136
2008-02-14 22:16:04 +00:00
Ted Kremenek 64de207c52 Partitioned definition/implementation of GRExperEngine into .h and .cpp.
Still some cleanup to do, but this initial checkin compiles and runs correctly.

llvm-svn: 47135
2008-02-14 22:13:12 +00:00
Ted Kremenek cf7cf8e8b0 Migrated transfer functions for binary operators for simple value tracking
from RValues to GRTransferFuncs/GRSimpleVals.

llvm-svn: 47131
2008-02-14 19:37:24 +00:00
Chris Lattner 99a59b6ba0 ParseCompoundStatementBody expects to only be called with { as the current
token.  Diagnose when the { is missing in objc @try blocks instead of aborting.

llvm-svn: 47130
2008-02-14 19:27:54 +00:00
Chris Lattner 70e294660a Fix PR2029
llvm-svn: 47129
2008-02-14 19:18:13 +00:00
Chris Lattner 558a3ba17f Fix a miscompilation from Dan's recent apintification.
llvm-svn: 47128
2008-02-14 18:48:56 +00:00
Nate Begeman 4b3210a3ec Fix single precision FP constants on SPU. They are actually legal,
which allows us to kill a target-specific node.

llvm-svn: 47127
2008-02-14 18:43:04 +00:00
Ted Kremenek 4bad8f7ad6 Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.
llvm-svn: 47126
2008-02-14 18:40:24 +00:00
Ted Kremenek 3ca942969e Started partitioning of transfer function logic (and thus the policy behind
these operations) into GRTransferFuncs and its subclasses.  Originally all
of this logic was handled by the class RValue, but in reality different
analyses will want more flexibility on how they evaluate different values.

Transfer functions migrated so far: "Cast"

llvm-svn: 47125
2008-02-14 18:28:23 +00:00
Duncan Sands 551d3e6303 Rename CFEBuildInstrs.html to GCCFEBuildInstrs.html.
Update all references to it and place a redirection
page at the old address.

llvm-svn: 47124
2008-02-14 17:53:22 +00:00
Ted Kremenek 747c777bde Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".
llvm-svn: 47123
2008-02-14 17:30:51 +00:00
Duncan Sands 4c95dbd69f In TargetLowering::LowerCallTo, don't assert that
the return value is zero-extended if it isn't
sign-extended.  It may also be any-extended.
Also, if a floating point value was returned
in a larger floating point type, pass 1 as the
second operand to FP_ROUND, which tells it
that all the precision is in the original type.
I think this is right but I could be wrong.
Finally, when doing libcalls, set isZExt on
a parameter if it is "unsigned".  Currently
isSExt is set when signed, and nothing is
set otherwise.  This should be right for all
calls to standard library routines.

llvm-svn: 47122
2008-02-14 17:28:50 +00:00
Nate Begeman 53e1b3f9d5 Change how FP immediates are handled.
1) ConstantFP is now expand by default
2) ConstantFP is not turned into TargetConstantFP during Legalize
   if it is legal.

This allows ConstantFP to be handled like Constant, allowing for 
targets that can encode FP immediates as MachineOperands.

As a bonus, fix up Itanium FP constants, which now correctly match,
and match more constants!  Hooray.

llvm-svn: 47121
2008-02-14 08:57:00 +00:00
Nate Begeman a338594236 Completed note
llvm-svn: 47120
2008-02-14 08:19:48 +00:00
Tanya Lattner 5429dbf6c7 Remove llvm-upgrade
llvm-svn: 47119
2008-02-14 07:57:12 +00:00
Anders Carlsson b0aad621fd Address comments from Chris.
llvm-svn: 47118
2008-02-14 07:43:43 +00:00
Nate Begeman 26b76b69f4 Support a new type of MachineOperand, MO_FPImmediate, used for holding
FP Immediates, crazily enough

llvm-svn: 47117
2008-02-14 07:39:30 +00:00
Chris Lattner 89acd61805 simplify code, no functionality change.
llvm-svn: 47116
2008-02-14 07:39:01 +00:00
Nate Begeman 64db2b9615 Move some useful operands up into the all-targets .td
llvm-svn: 47115
2008-02-14 07:25:46 +00:00
Nate Begeman 94ea004023 Nuke dead comment
llvm-svn: 47114
2008-02-14 07:23:11 +00:00
Nick Lewycky 9592bb0390 Testcase for PR2032.
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Anders Carlsson b853a1a049 Add Attr.h which is an AST-level class for GCC attributes.
llvm-svn: 47112
2008-02-14 07:14:34 +00:00
Nick Lewycky 7c77e2bc65 Fix PR2032. Inform the alias analysis of changes to the underlying program.
llvm-svn: 47111
2008-02-14 07:11:24 +00:00
Tanya Lattner f865dcd009 Remove llvm-upgrade.
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Chris Lattner eb63b09206 upgrade some entries, remove stuff that is done.
llvm-svn: 47109
2008-02-14 06:19:02 +00:00
Chris Lattner 5bc0957f5b the mid-level optimizer removes this stuff.
llvm-svn: 47108
2008-02-14 05:43:18 +00:00
Chris Lattner b43983b274 this one is easy.
llvm-svn: 47107
2008-02-14 05:41:38 +00:00
Chris Lattner 3bd37f549a This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
llvm-svn: 47106
2008-02-14 05:39:46 +00:00
Nick Lewycky 8102d473ce PR2027, Fix bugpoint's -find-bugs option, clean up the code.
llvm-svn: 47105
2008-02-14 05:01:46 +00:00
Steve Naroff 2d868f2bcd Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect if the decl spec was invalid.
For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.

llvm-svn: 47104
2008-02-14 03:30:24 +00:00
Steve Naroff f631997cb5 A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.
llvm-svn: 47103
2008-02-14 02:58:32 +00:00
Evan Cheng a4621f04bb Fix test.
llvm-svn: 47102
2008-02-14 01:32:53 +00:00
Dan Gohman 7e22a5d8df Allow the APInt form of ComputeMaskedBits to operate on i128 types.
llvm-svn: 47101
2008-02-13 23:13:32 +00:00
Ted Kremenek 80ebc1d1c9 Added support to GRCoreEngine/GRExprEngine for processing control-flow
from switch...case...default statements.

llvm-svn: 47100
2008-02-13 23:08:21 +00:00
Dan Gohman 9ca025f1dc Assigning an APInt to 0 with plain assignment gives it a one-bit
size. Initialize these APInts to properly-sized zero values.

llvm-svn: 47099
2008-02-13 23:07:24 +00:00
Dan Gohman 95d25d39d0 Avoid setting bits that aren't demanded.
llvm-svn: 47098
2008-02-13 22:43:25 +00:00
Dan Gohman ad66526ede Fix a typo in a comment.
llvm-svn: 47097
2008-02-13 22:32:12 +00:00
Dan Gohman e1d9ee66ed Simplify some logic in ComputeMaskedBits. And change ComputeMaskedBits
to pass the mask APInt by value, not by reference. 

llvm-svn: 47096
2008-02-13 22:28:48 +00:00
Devang Patel 0ecb76d820 A loop latch phi node may have uses inside loop, not just in loop header.
llvm-svn: 47093
2008-02-13 22:23:07 +00:00
Dan Gohman 63705ecefd Adjust for APInt's isPositive being renamed to isNonNegative.
llvm-svn: 47091
2008-02-13 22:09:49 +00:00
Dan Gohman 1ee8dc97d9 Rename APInt's isPositive to isNonNegative, to reflect what it
actually does.

llvm-svn: 47090
2008-02-13 22:09:18 +00:00
Devang Patel 22c3caab6e While moving exit condition, do not drop loop latch on the floor.
llvm-svn: 47089
2008-02-13 22:06:36 +00:00
Ted Kremenek 654c78fd2d When creating the CFGBlocks for a switch statement, we now have the "default"
branch ALWAYS be the last successor for a switch-terminated block. This allows
clients to distinguish cases like the following:

switch(...)
  case XXX:
    switch(...) {
      case YYY: ...
    }
    
  case ZZZ: ..
}

In this case, the block with "case ZZZ:" is the default block for the inner
switch statement, but that case is associated with the outer switch statement,
and not the inner one. Clients can test for this behavior by checking if a
successor block is the last one (and thus just assume that this is the "default"
case).

llvm-svn: 47088
2008-02-13 22:05:39 +00:00
Ted Kremenek 9682be18ae Fixed bug in CFG construction when processing switch statements that contain no
"default" case. In such cases, we now correctly add the CFGBlock representing
the code after the switch statement as a successor to the block terminated by
the switch statement.

llvm-svn: 47087
2008-02-13 21:46:34 +00:00
Dan Gohman 8b4fa9dc0a Add countTrailingOnes member functions to APInt.
llvm-svn: 47086
2008-02-13 21:11:05 +00:00