Commit Graph

53227 Commits

Author SHA1 Message Date
Chris Lattner 43a85b1e4c Lazily paging in file contents is a big win for PTH, strip out the old
testing code.

llvm-svn: 63006
2009-01-26 07:37:49 +00:00
Evan Cheng 3975bbec58 LLVM_SUPPORT_DEBUGINFO_H -> LLVM_ANALYSIS_DEBUGINFO_H since DebugInfo.h is under Analysis.
llvm-svn: 63005
2009-01-26 07:31:20 +00:00
Chris Lattner 273fc663df Bitmangle file characteristic bits into the low bits of
the content cache pointer.  This saves 105876 bytes on
cocoa.h because it shrinks the SLocEntry union, which
we have a big array of.  It would be nice to use 
PointerIntPair here, but we can't because it is in a 
union.

llvm-svn: 63004
2009-01-26 06:49:09 +00:00
Chris Lattner 76e689636b add parsing and constraint enforcement for GNU line marker directives.
llvm-svn: 63003
2009-01-26 06:19:46 +00:00
Ted Kremenek e9193283c6 Use tag classes instead of typedefs for GDM entries 'ConstNotEq' and 'ConstEq'. This avoids collisions in the GDM.
llvm-svn: 63002
2009-01-26 06:04:53 +00:00
Chris Lattner 5a8057bc18 add another sanity test.
llvm-svn: 63001
2009-01-26 05:44:13 +00:00
Chris Lattner 38d7fd252a a few minor cleanups
llvm-svn: 63000
2009-01-26 05:30:54 +00:00
Chris Lattner 100c65e810 parse and enforce required constraints on #line directives. Right now
we just discard them.

llvm-svn: 62999
2009-01-26 05:29:08 +00:00
Mon P Wang 3537a62704 Fixed optimization of combining two shuffles where the first shuffle inputs
has a different number of elements than the output.

llvm-svn: 62998
2009-01-26 04:39:00 +00:00
Chris Lattner d6d0619fb4 added to wrong directory
llvm-svn: 62997
2009-01-26 04:36:31 +00:00
Chris Lattner 5fe12615c2 an insane macro testcase.
llvm-svn: 62996
2009-01-26 04:36:10 +00:00
Dan Gohman 8e4ac9b71a Take the next steps in making SDUse more consistent with LLVM Use, and
tidy up SDUse and related code.
 - Replace the operator= member functions with a set method, like
   LLVM Use has, and variants setInitial and setNode, which take
   care up updating use lists, like LLVM Use's does. This simplifies
   code that calls these functions.
 - getSDValue() is renamed to get(), as in LLVM Use, though most
   places can either use the implicit conversion to SDValue or the
   convenience functions instead.
 - Fix some more node vs. value terminology issues.

Also, eliminate the one remaining use of SDOperandPtr, and
SDOperandPtr itself.

llvm-svn: 62995
2009-01-26 04:35:06 +00:00
Chris Lattner ad13cf4e7a eagerly resolve the spelling locations of macro argument preexpansions.
This reduces fsyntax-only time on c99-intconst-1.c from 2.43s down to 
2.01s (20%), reducing the number of fileid lookups from 2529040 linear 
and 64771121 binary to 5625902 linear and 4151182 binary.

This knocks getFileID down to only 4.6% of compile time on this testcase.
At this point, malloc/free is over 35% of compile time, primarily allocating
MacroArgs objects and their argument preexpansion vectors.

I don't feel like malloc avoiding right now, so I'm just going to call
this good.

llvm-svn: 62994
2009-01-26 04:33:10 +00:00
Chris Lattner 5a5d67101b Eagerly resolve the spelling location of the tokens in a definition
of a macro.  Since these tokens may themselves be from macro 
expansions, we need to resolve down to the spelling loc when the
macro ends up being instantiated.  Instead of resolving this for
each token expanded from the macro definition, just do it once when
the macro is defined.  This speeds up clang on c99-intconst-1.c from
2.66s to 2.43s (9.5%), reducing the FileID lookups from 407244 linear and
114175649 binary to 2529040 linear and 64771121 binary.

llvm-svn: 62993
2009-01-26 04:06:48 +00:00
Chris Lattner dd9babc79a Only resolve a macro's instantiation loc once per macro, instead of once
per token lexed from it.  This speeds up clang on c99-intconst-1.c from
the GCC testsuite from 3.64s to 2.66s (36%).  This reduces the number of
binary search FileID lookups from 251570522 to 114175649 on this testcase.

llvm-svn: 62992
2009-01-26 03:46:22 +00:00
Scott Michel 95b2a206ee Untabify code.
llvm-svn: 62991
2009-01-26 03:37:41 +00:00
Scott Michel 9e3e4a9219 CellSPU:
- Rename fcmp.ll test to fcmp32.ll, start adding new double tests to fcmp64.ll
- Fix select_bits.ll test
- Capitulate to the DAGCombiner and move i64 constant loads to instruction
  selection (SPUISelDAGtoDAG.cpp).

  <rant>DAGCombiner will insert all kinds of 64-bit optimizations after
  operation legalization occurs and now we have to do most of the work that
  instruction selection should be doing twice (once to determine if v2i64
  build_vector can be handled by SelectCode(), which then runs all of the
  predicates a second time to select the necessary instructions.) But,
  CellSPU is a good citizen.</rant>

llvm-svn: 62990
2009-01-26 03:31:40 +00:00
Nate Begeman 624801e87e Fix a typo
llvm-svn: 62989
2009-01-26 03:15:54 +00:00
Nate Begeman a2550a8e96 De-identifying per sabre review
llvm-svn: 62988
2009-01-26 03:15:31 +00:00
Nick Lewycky 5c8fc9d549 Build libLTO on any platform so long as PIC is enabled.
llvm-svn: 62987
2009-01-26 03:04:57 +00:00
Nate Begeman 7ea4e861ca Add some documentation for address-space-based access to the segment registers.
llvm-svn: 62986
2009-01-26 02:54:45 +00:00
Chris Lattner 9449991c4f Handle single-entry phi nodes gracefully in condprop.
llvm-svn: 62985
2009-01-26 02:18:20 +00:00
Chris Lattner 7b6647c178 Fix PR3408 by making a non-obvious assumption very obvious, and
handling the flaw inherent in that assumption.  :)

llvm-svn: 62984
2009-01-26 02:11:30 +00:00
Chris Lattner 57cb472b56 More cleanups and simplifications, no functionality change.
llvm-svn: 62983
2009-01-26 01:57:01 +00:00
Chris Lattner d67aaa6560 tidy asserts
llvm-svn: 62982
2009-01-26 01:38:24 +00:00
Eli Friedman 16c88df1a0 PR3269: create an empty InitListExpr as a child for the
CompoundLiteralExpr so that there aren't any null pointers in the AST.

llvm-svn: 62981
2009-01-26 01:33:06 +00:00
Nate Begeman 5eca265519 Map address space 256 to gs; similar mappings could be supported for the
other x86 segments.  address space 0 is stack/default, 1-255 are reserved for
client use.

llvm-svn: 62980
2009-01-26 01:24:32 +00:00
Nate Begeman 8a51d8c8f7 Support pattern matching various x86 sse shifts.
llvm-svn: 62979
2009-01-26 00:52:55 +00:00
Chris Lattner 4fa23625ab Check in the long promised SourceLocation rewrite. This lays the
ground work for implementing #line, and fixes the "out of macro ID's" 
problem.

There is nothing particularly tricky about the code, other than the
very performance sensitive SourceManager::getFileID() method.

llvm-svn: 62978
2009-01-26 00:43:02 +00:00
Sebastian Redl cf8e1fa58e Update C++ status table with new member pointer conversion capabilities.
llvm-svn: 62977
2009-01-26 00:11:25 +00:00
Chris Lattner 80b283c1cd silence a warning when assertions are disabled.
llvm-svn: 62976
2009-01-25 23:08:00 +00:00
Chris Lattner 3138e81621 improve ASTContext::getDeclAlign comment, as suggested by Eli.
llvm-svn: 62975
2009-01-25 23:06:38 +00:00
Chris Lattner 4f765fb198 use simpler method
llvm-svn: 62974
2009-01-25 22:02:19 +00:00
Torok Edwin 692ed0f67d should have removed the + when manually applying a patch!
llvm-svn: 62973
2009-01-25 20:29:34 +00:00
Torok Edwin 97be2f5840 revert this patch for now, because Codegen does still want to generate SSE code,
for example in the case of va-args. XFAIL associated tests.

llvm-svn: 62972
2009-01-25 20:21:24 +00:00
Sebastian Redl 72b597d6b6 Implement implicit conversions for pointers-to-member.
llvm-svn: 62971
2009-01-25 19:43:20 +00:00
Torok Edwin 3cc1940003 testcase for llvm-gcc part of PR3402.
llvm-svn: 62969
2009-01-25 18:00:06 +00:00
Torok Edwin a23c73bbdc If user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.
llvm-svn: 62967
2009-01-25 17:58:56 +00:00
Dan Gohman f1d38be265 Eliminate the loop that searches through each of the operands
of each use in the SelectionDAG ReplaceAllUses* functions. Thanks
to Chris for spotting this opportunity.

Also, factor out code from all 5 of the ReplaceAllUses* functions
into AddNonLeafNodeToCSEMaps, which is now renamed
AddModifiedNodeToCSEMaps to more accurately reflect its purpose.

llvm-svn: 62964
2009-01-25 16:29:12 +00:00
Dan Gohman 3a113ec468 Whitespace tidiments.
llvm-svn: 62963
2009-01-25 16:21:38 +00:00
Dan Gohman e7b0dde2ee Move the N->use_empty() assert from DeleteNode to
DeleteNodeNotInCSEMaps, since DeleteNode just calls
DeleteNodeNotInCSEMaps.

llvm-svn: 62962
2009-01-25 16:20:37 +00:00
Dan Gohman e3f2278de1 Reality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"
llvm-svn: 62961
2009-01-25 16:04:50 +00:00
Sebastian Redl 8b2540439f Introduce an explicit case for member pointers in CodeGenTypes. However, it simply asserts.
llvm-svn: 62960
2009-01-25 13:35:30 +00:00
Sebastian Redl a865ade730 Fix compile error from r62953.
llvm-svn: 62959
2009-01-25 13:34:47 +00:00
Nick Lewycky 21add8f983 Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size.

llvm-svn: 62958
2009-01-25 08:16:27 +00:00
Nick Lewycky cb7a10ab63 Actually run the test in this directory.
llvm-svn: 62957
2009-01-25 08:05:07 +00:00
Nick Lewycky 5647c5d1a4 The function that does nothing but call malloc is noalias return.
llvm-svn: 62956
2009-01-25 07:59:57 +00:00
Evan Cheng 1c7c019229 Private linkage support for PPC / Darwin.
llvm-svn: 62955
2009-01-25 06:32:01 +00:00
Evan Cheng abda665f5f Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1                                                                                                                                     
%reg1029<def> = MOV8rr %reg1028                                                                                                                                                      
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>                                                                                                                            
insert => %reg1030<def> = MOV8rr %reg1028                                                                                                                                            
%reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead>                                                                                                         

In this case, it might not be possible to coalesce the second MOV8rr                                                                                                                 
instruction if the first one is coalesced. So it would be profitable to                                                                                                              
commute it:                                                                                                                                                                          
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1                                                                                                                                     
%reg1029<def> = MOV8rr %reg1028                                                                                                                                                      
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>                                                                                                                            
insert => %reg1030<def> = MOV8rr %reg1029                                                                                                                                            
%reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead>

llvm-svn: 62954
2009-01-25 03:53:59 +00:00
Eli Friedman 8bad1c5903 One more case for Expr::isConstantInitializer; I think this covers
everything that we aren't intending to implement in Expr::Evaluate.

llvm-svn: 62953
2009-01-25 03:27:40 +00:00