Commit Graph

42670 Commits

Author SHA1 Message Date
Chris Lattner ad75302497 Fix the x86-64 side of PR2108 by adding a v2f64 version of
MOVZQI2PQIrr.  This would be better handled as a dag combine 
(with the goal of eliminating the bitconvert) but I don't know
how to do that safely.  Thoughts welcome.

llvm-svn: 49463
2008-04-10 05:13:43 +00:00
Chris Lattner 57dd77462b produce an error on invalid input instead of asserting:
def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
           ^

llvm-svn: 49462
2008-04-10 04:48:34 +00:00
Evan Cheng 9d339849ee Teach branch folding pass about implicit_def instructions. Unfortunately we can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away.
llvm-svn: 49461
2008-04-10 02:32:10 +00:00
Chris Lattner 0e91b41902 typedef void T;
void f(T);

is only invalid in C++ mode, not C89 mode.

llvm-svn: 49460
2008-04-10 02:26:16 +00:00
Chris Lattner 58258246ec Several improvements from Doug Gregor related to default
argument handling.  I'll fix up the c89 (void) thing next.

llvm-svn: 49459
2008-04-10 02:22:51 +00:00
Chris Lattner a29d2536aa Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.
This is not safe for all inputs.

llvm-svn: 49458
2008-04-10 02:07:51 +00:00
Evan Cheng 2025a490d0 Move memcpy / memset optimization pass after GVN.
llvm-svn: 49457
2008-04-10 01:33:05 +00:00
Ted Kremenek c8bef6a076 Hooked up initial reference-count checks to the BugReporter interface.
llvm-svn: 49455
2008-04-09 23:49:11 +00:00
Ted Kremenek 7acc3a36ef Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.
Bugs are now reported using a combination of "BugType" (previously
BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which
generates PathDiagnostics). This provides a far more modular way of registering
bug types and plugging in diagnostics.

GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the
ExplodedGraph.

ExplodedGraph is no longer templated on the "checker", but instead on the state
contained in the nodes.

llvm-svn: 49453
2008-04-09 21:41:14 +00:00
Evan Cheng c8eeb752a3 - More aggressively coalescing away copies whose source is defined by an implicit_def.
- Added insert_subreg coalescing support.

llvm-svn: 49448
2008-04-09 20:57:25 +00:00
Dan Gohman 33b3300178 Make isVectorClearMaskLegal's operand list const.
llvm-svn: 49446
2008-04-09 20:09:42 +00:00
Dan Gohman 44b3005e86 Fix some minor errors in comments.
llvm-svn: 49445
2008-04-09 20:08:06 +00:00
Dan Gohman 3049516bd5 Add const qualifiers.
llvm-svn: 49443
2008-04-09 18:31:41 +00:00
Dan Gohman bb0022b810 Update comments to use 2.0 syntax type names.
llvm-svn: 49442
2008-04-09 18:24:25 +00:00
Dan Gohman 3d074a3125 Add XMM1 as a second return value register for f32 and f64 on x86-64. This
is needed for the x86-64-ABI handling of structs that contain floating-point
members that are returned by value.

llvm-svn: 49441
2008-04-09 17:54:37 +00:00
Dan Gohman cbf87313a2 Add DX as a second return value register for i16 on x86.
llvm-svn: 49440
2008-04-09 17:53:38 +00:00
Chris Lattner 802134fc02 Generalize getUnaryFloatFunction to handle any FP unary function, automatically
figuring out the suffix to use.  implement pow(2,x) -> exp2(x).

llvm-svn: 49437
2008-04-09 17:48:11 +00:00
Chris Lattner 091afc7714 remove capital letter from test name.
llvm-svn: 49436
2008-04-09 17:46:36 +00:00
Chris Lattner cca74e5ab9 use the new ConstantFP::get method to make this work with
long double and simplify the code.

llvm-svn: 49435
2008-04-09 17:17:35 +00:00
Chris Lattner 0704e3acff ConstantFP::get should be static.
llvm-svn: 49434
2008-04-09 17:16:28 +00:00
Nate Begeman a6063118c6 Fix a bug where an incorrect bit mask would be generated if a target's last asm
string began at a power of 2 in the string index.  For example, if "ret" started
at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31.

llvm-svn: 49433
2008-04-09 16:24:11 +00:00
Devang Patel a7dfbc0366 Be conservative if getresult operand is neither call nor invoke.
llvm-svn: 49430
2008-04-09 15:58:24 +00:00
Ted Kremenek 43e0633048 The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, once
in CGObjCGNU.cpp and once in CGObjCEtoile.cpp.  Moved its definition to
CGObjC.cpp.  This resolves a build error in Xcode, and also cleans things up.

llvm-svn: 49429
2008-04-09 15:51:31 +00:00
Ted Kremenek 1d511d3bae Add SemaDeclCXX.cpp to Xcode project.
llvm-svn: 49428
2008-04-09 15:50:11 +00:00
Ted Kremenek f17d5758fc Micro-optimization: Don't use ostringstream when using a C-string literal
will work just fine.

llvm-svn: 49427
2008-04-09 15:40:40 +00:00
Owen Anderson ef9a6fd5c2 Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.

llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Owen Anderson 8ee792d1b6 Remove accidentally duplicated code.
llvm-svn: 49418
2008-04-09 07:55:01 +00:00
Evan Cheng 0515472470 Unbreak teh build.
llvm-svn: 49417
2008-04-09 07:06:01 +00:00
Chris Lattner 98bd939af8 add a simplified accessor for creating an fp constant of a
particular value but variable type.

llvm-svn: 49416
2008-04-09 06:38:30 +00:00
Evan Cheng aa3b55f842 Missed a hasInterval check.
llvm-svn: 49415
2008-04-09 01:30:15 +00:00
Ted Kremenek ce8e881dc3 Added some boilerplate for emitting warnings from the CF-reference count checker.
llvm-svn: 49414
2008-04-09 01:10:13 +00:00
Chris Lattner b5b3e3136b add a version of ConstantFP::get that doesn't take a redundant Type* value,
start migrating code over to use it.

llvm-svn: 49413
2008-04-09 00:45:01 +00:00
Ted Kremenek 3cef454e2e Added new "BugReporterHelper" class which is used by BugReporter to emit
checker-specific diagnostics.

llvm-svn: 49412
2008-04-09 00:20:43 +00:00
Chris Lattner b859fb49ed many cleanups to the pow optimizer. Allow it to handle powf,
add support for  pow(x, 2.0) -> x*x.

llvm-svn: 49411
2008-04-09 00:07:45 +00:00
Chris Lattner 8ca9450885 make ConstantFP::isExactlyValue work for long double as well.
llvm-svn: 49410
2008-04-09 00:03:58 +00:00
Ted Kremenek d4db4fa359 For -emit-html, use the Rewriter to expand tabs.
llvm-svn: 49409
2008-04-08 23:25:54 +00:00
Ted Kremenek 5f7ece0bff Don't expand tabs in EscapeText, but rather expand them when writing out
the HTML file.  This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.

llvm-svn: 49406
2008-04-08 22:37:58 +00:00
Ted Kremenek 5d1647daf9 Add HTMLRewrite.h to Xcode project.
llvm-svn: 49405
2008-04-08 22:31:28 +00:00
Ted Kremenek b1f773ca98 When substituting tabs during HTMLification, only add "&nbsp;" when we are
"escaping" spaces.

llvm-svn: 49404
2008-04-08 22:28:15 +00:00
Ted Kremenek d8256ed2fe Improve range highlighting in HTMLDiagnostic to correctly highlight ranges
that span multiple lines by inserting multiple "</span>" and "<span>" tags.

llvm-svn: 49403
2008-04-08 21:29:14 +00:00
Ted Kremenek dbd1c183b0 Make SourceManager::getFullFilePos() public.
llvm-svn: 49402
2008-04-08 21:26:35 +00:00
Sam Bishop 506215c708 Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
the pattern of the other Decl classes.

llvm-svn: 49399
2008-04-08 20:49:25 +00:00
Devang Patel 0a14b5b649 Add CreateGetResult()
llvm-svn: 49398
2008-04-08 20:41:22 +00:00
Ted Kremenek ba0e4237aa Set the location of ccc-analyzer to be the same directory as where scan-build
is located.

llvm-svn: 49397
2008-04-08 20:22:12 +00:00
Duncan Sands 470ab1a04d Check that bodies and calls but not declarations
are marked nounwind when compiling without
-fexceptions.

llvm-svn: 49393
2008-04-08 19:31:52 +00:00
Dale Johannesen 5169fa17b5 Rename -disable-required-unwind-tables to -unwind-tables-optional.
llvm-svn: 49391
2008-04-08 18:10:08 +00:00
Dale Johannesen 4c0c018bc5 Rename -disable-required-unwind-tables to unwind-tables-optional.
llvm-svn: 49389
2008-04-08 18:07:49 +00:00
Gabor Greif 00fcdeddd3 merge r48768 from branches/ggreif/parallelized-test
llvm-svn: 49382
2008-04-08 15:22:41 +00:00
Devang Patel 3d840ded0d Add multiple value return instruction constructor.
llvm-svn: 49374
2008-04-08 07:30:13 +00:00
Duncan Sands 57d3a36386 Convenience method for setting the nounwind
attribute for a function.

llvm-svn: 49373
2008-04-08 07:23:58 +00:00