Commit Graph

45302 Commits

Author SHA1 Message Date
Nick Lewycky 21d0a8cca0 Because of the laziness, the required passes must exist even after
LoopVR::runOnFunction runs.

This should accomplish that, but it doesn't. I think that's a PassManager bug,
but without a consumer of LoopVR in the tree, I can't give steps to reproduce.

llvm-svn: 52886
2008-06-30 01:04:39 +00:00
Nick Lewycky 48b1fd74dc Add a value range analysis that lazily computes ranges using ScalarEvolutions.
llvm-svn: 52885
2008-06-30 00:04:21 +00:00
Anton Korobeynikov a7c583d584 Revert (52748 and friends):
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

This unbreaks llvm-gcc bootstrap.

llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Chris Lattner a7e619c17b make type attribute processing static instead of methods on Sema.
llvm-svn: 52881
2008-06-29 00:50:08 +00:00
Chris Lattner b632a6e534 make the rest of the decl attribute processing methods be
static functions instead of methods on sema.

llvm-svn: 52880
2008-06-29 00:43:07 +00:00
Chris Lattner a663a0a1b6 make most of Sema public. Sema is a class private to the Sema library
anyway, so there is no real loss here.  Start making attribute processing
methods static functions instead of methods on Sema.

llvm-svn: 52879
2008-06-29 00:28:59 +00:00
Chris Lattner 9e2aafea38 move a few methods, no other change.
llvm-svn: 52878
2008-06-29 00:23:49 +00:00
Chris Lattner c4ecec545e handle type attributes when converting types, not when processing decls.
llvm-svn: 52877
2008-06-29 00:19:33 +00:00
Chris Lattner 58418ffa32 Make ProcessDeclAttributes walk the declarator structure pulling
decl attributes out of the various places they can hide.  This makes
us correctly reject things like this:

t.c:2:22: error: mode attribute only supported for integer and floating-point types
  int **__attribute((mode(HI)))* i32;
                     ^

because you can't make a pointer be HImode.

llvm-svn: 52876
2008-06-29 00:16:31 +00:00
Chris Lattner 2727d1b221 move some code from all callers of ProcessDeclAttributes into
the implementation of ProcessDeclAttributes.

llvm-svn: 52875
2008-06-29 00:02:00 +00:00
Chris Lattner a574154106 more attribute refactoring/renaming, no functionality change.
llvm-svn: 52874
2008-06-28 23:58:55 +00:00
Chris Lattner 4627b74233 more minor tidiness.
llvm-svn: 52873
2008-06-28 23:50:44 +00:00
Chris Lattner ed9cbbc4f0 more cleanups, refactor HandleVectorTypeAttribute
to work list the rest of the attr handlers.  Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.

llvm-svn: 52872
2008-06-28 23:48:25 +00:00
Chris Lattner 4a927cba2e adjust the prototypes of a bunch of decl processing methods to take
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.

This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.

llvm-svn: 52871
2008-06-28 23:36:30 +00:00
Anton Korobeynikov 2e052a81fd Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
llvm-svn: 52868
2008-06-28 13:45:57 +00:00
Anton Korobeynikov 3c21b05225 Unbreak
llvm-svn: 52866
2008-06-28 11:10:06 +00:00
Anton Korobeynikov a54216acf3 Temporary rever invalid commit
llvm-svn: 52865
2008-06-28 11:09:48 +00:00
Anton Korobeynikov ab9ff5a44f Move printing of module-level GVs into dedicated helper
llvm-svn: 52864
2008-06-28 11:09:32 +00:00
Anton Korobeynikov 9c53d0f0df Use common naming convention
llvm-svn: 52863
2008-06-28 11:09:17 +00:00
Anton Korobeynikov 76b8828c25 Factor out stuff into helper function
llvm-svn: 52862
2008-06-28 11:09:01 +00:00
Anton Korobeynikov 7d345eb4b1 Cleanup
llvm-svn: 52861
2008-06-28 11:08:44 +00:00
Anton Korobeynikov 016d1d0470 Remove X86SharedAsmPrinter
llvm-svn: 52860
2008-06-28 11:08:27 +00:00
Anton Korobeynikov 5643cb7ecc whitespace cleanup
llvm-svn: 52859
2008-06-28 11:08:09 +00:00
Anton Korobeynikov 4e9dfe8391 Make intel asmprinter child of generic asmprinter, not x86 shared asm printer. This leads to some code duplication, which will be resolved later.
llvm-svn: 52858
2008-06-28 11:07:54 +00:00
Anton Korobeynikov bc7cce6b74 Cleanup
llvm-svn: 52857
2008-06-28 11:07:35 +00:00
Anton Korobeynikov 44e99f47ad Whitespace cleanup
llvm-svn: 52856
2008-06-28 11:07:18 +00:00
Argyrios Kyrtzidis f4ebe9ea4f Handle unnamed bitfields when parsing C++ classes.
llvm-svn: 52855
2008-06-28 08:10:48 +00:00
Chris Lattner 3cffa471d9 Really fix the bootstrap failure.
llvm-svn: 52854
2008-06-28 06:24:50 +00:00
Eli Friedman 4f89ccb1df Fix for PR2501; this patch makes usual arithmetic conversions for
integers which have the same width and different signedness work 
correctly. (The testcase in PR2501 uses a comparison between long and 
unsigned int).

llvm-svn: 52853
2008-06-28 06:23:08 +00:00
Argyrios Kyrtzidis 853fbea313 Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext.
llvm-svn: 52852
2008-06-28 06:07:14 +00:00
Chris Lattner 1701328675 Add back the capability to include nul characters in strings with
GetConstantStringInfo.  This will hopefully restore llvm-gcc to 
happy bootstrap land.

llvm-svn: 52851
2008-06-28 05:33:32 +00:00
Chris Lattner ebf1f67193 Tighten up checking.
llvm-svn: 52850
2008-06-28 04:37:04 +00:00
Dan Gohman 6f7b5a6392 When folding a bitcast into a load or store, preserve the alignment
information of the original load or store, which is checked to be
at least as good, and possibly better.

llvm-svn: 52849
2008-06-28 00:45:22 +00:00
Ted Kremenek 62ea6e8b6a Updated checker build to checker-47.
llvm-svn: 52848
2008-06-28 00:13:07 +00:00
Seo Sanghyeon 8f7291387f Fix GetMainExecutable. Patch by Sam Bishop.
llvm-svn: 52847
2008-06-27 22:55:30 +00:00
Chris Lattner e6c693d932 Fix a bug where we didn't promote 'const float' (or typedefs) to
double in some places.

llvm-svn: 52846
2008-06-27 22:48:56 +00:00
Chris Lattner acbc2d200d the 'mode' attribute is a decl attribute, not a type attribute. Move it to
SemaDeclAttr, and do some cleanups.

llvm-svn: 52844
2008-06-27 22:18:37 +00:00
Evan Cheng 9a357637ef Looks like this condition is inverted.
llvm-svn: 52841
2008-06-27 22:11:49 +00:00
Chris Lattner 0e7c7c9ee1 Nuno points out that my numbers were out of date
llvm-svn: 52840
2008-06-27 21:56:03 +00:00
Owen Anderson 05546f67cb Add a NextPowerOf2 function to calculate the next power of two greater than a given integer.
llvm-svn: 52839
2008-06-27 21:48:21 +00:00
Chris Lattner 36b4e8f2fe implement some fixme's by making "autorenaming" in the value symbol table not
thrash the heap with string stuff (e.g. utostr).

llvm-svn: 52838
2008-06-27 21:26:26 +00:00
Chris Lattner 42e983e5a9 simplify some code to avoid string thrashing.
llvm-svn: 52837
2008-06-27 21:25:24 +00:00
Anton Korobeynikov 266f1cc1e4 Use StringSet instead of std::set<std::string>
llvm-svn: 52836
2008-06-27 21:22:49 +00:00
Chris Lattner 7775588132 add a helper.
llvm-svn: 52835
2008-06-27 21:15:25 +00:00
Chris Lattner e43649fa62 Add a new version of Module::getFunction that takes a const char* instead
of a std::string.  This avoids copying the string to the heap in common
cases.  Patch by Pratik Solanki!

llvm-svn: 52834
2008-06-27 21:09:10 +00:00
Chris Lattner d9f8413402 making progress!
llvm-svn: 52833
2008-06-27 19:02:23 +00:00
Chris Lattner 5c91f4d7ba Tweak IRBuilder to explicitly call the setName(const char*) method on Value
instead of passing the name into the instruction ctors.  Since most 
instruction ctors take their name as an std::string, this avoids copying the
string to the heap and a malloc and free.

Patch by Pratik Solanki!

llvm-svn: 52832
2008-06-27 18:49:21 +00:00
Cedric Venet 69cb7be3b1 Add an include file needed for VS.
Add two new file to codegen project (VS).
This unbreak the build for VS.

llvm-svn: 52831
2008-06-27 18:00:09 +00:00
Cedric Venet 3903908794 Add missing include file (due to a file splitting in llvm).
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).

llvm-svn: 52830
2008-06-27 17:53:02 +00:00
Devang Patel abc6e6ab9f Add dominator info printer pass.
llvm-svn: 52829
2008-06-27 16:43:21 +00:00