Commit Graph

59453 Commits

Author SHA1 Message Date
Daniel Dunbar fdda3501a0 Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.

llvm-svn: 71266
2009-05-08 21:04:47 +00:00
Dan Gohman 2e55cc5a4a Fold trunc casts into add-recurrence expressions, allowing the
add-recurrence to be exposed. Add a new SCEV folding rule to
help simplify expressions in the presence of these extra truncs.

llvm-svn: 71264
2009-05-08 21:03:19 +00:00
Bill Wendling fa03b0084a Compute the offsets of the compile units. We need this so that when we emit a
concrete instance of an inlined function, we can get the actual address of the
abstract instance inside of the compile unit.

This isn't currently used, but will be by a future check-in.

llvm-svn: 71263
2009-05-08 21:03:15 +00:00
Dan Gohman c05bb947c4 Fix another bug in r71252. This code supports GetElementPtr
constant exprs as well as instructions.

llvm-svn: 71262
2009-05-08 20:58:38 +00:00
Daniel Dunbar 4861346c44 Darwin x86_32: Improve bit-field handling for returning records.
- This turns out to be a no-op now that most of the handling for
   everything else is in place.

llvm-svn: 71261
2009-05-08 20:55:49 +00:00
Bill Wendling 9ee6a31bb8 Fix typo.
llvm-svn: 71260
2009-05-08 20:49:29 +00:00
Dan Gohman 5122d6152e Add memoization for getSCEVAtScope results for instructions
which are not analyzed with SCEV techniques, which can require
brute-forcing through a large number of instructions. This
fixes a massive compile-time issue on 400.perlbench (in
particular, the loop in MD5Transform).

llvm-svn: 71259
2009-05-08 20:47:27 +00:00
Dan Gohman b81f47d191 Make the SCEV* form of getSCEVAtScope public, to allow ScalarEvolution
clients to use it.

llvm-svn: 71258
2009-05-08 20:38:54 +00:00
Bill Wendling 2dc580c954 Minor clean ups. No functionality change.
llvm-svn: 71256
2009-05-08 20:38:02 +00:00
Dan Gohman 2173bd3f34 Fix an error from r71252.
llvm-svn: 71255
2009-05-08 20:36:47 +00:00
Bill Wendling eefdf8970e Print out nicer dump info for DIDescriptor.
llvm-svn: 71253
2009-05-08 20:28:06 +00:00
Dan Gohman ee750d142d Factor out the code for creating SCEVs for GEPs into a
separate function.

llvm-svn: 71252
2009-05-08 20:26:55 +00:00
Daniel Dunbar 85f4028f2e Darwin x86_32: Ignore arrays of empty structures inside records.
- This eliminates 5/1000 failures on return-types-32, on the current
   ABITest config.

llvm-svn: 71250
2009-05-08 20:21:04 +00:00
Fariborz Jahanian fe9e3940eb Refactoring of my last patch.
llvm-svn: 71248
2009-05-08 20:20:55 +00:00
Dan Gohman c3a3cb47d2 Implement several new SCEV folding rules for UDiv SCEVs.
This fixes an old FIXME, and is needed by some upcoming changes.

llvm-svn: 71247
2009-05-08 20:18:49 +00:00
Daniel Dunbar 51c4bc320e ABITest: Move default set of test args into common makefile.
Also, tweak default list of bit-fields to try.

llvm-svn: 71246
2009-05-08 20:10:52 +00:00
Dan Gohman bd953333f8 Add a getExitBlock utility function to LoopInfo which returns the
exit block of a loop, if there is exactly one, similar to
getExitingBlock.

llvm-svn: 71245
2009-05-08 20:07:23 +00:00
Ted Kremenek 3a0516b25a retain checker: Track the number of times a tracked object is sent
'autorelease'. This isn't used yet to flag errors.

llvm-svn: 71244
2009-05-08 20:01:42 +00:00
Fariborz Jahanian b2ab73d93c More type checking for properties, accessors and
use of dot-syntax expression. This is to match gcc's.

llvm-svn: 71243
2009-05-08 19:36:34 +00:00
Evan Cheng 6e9959e327 Don't align loop header unless the loop back edge is below the header.
llvm-svn: 71242
2009-05-08 19:01:44 +00:00
Anton Korobeynikov 65a58168cc Factor out cycle-finder code and make it generic.
llvm-svn: 71241
2009-05-08 18:51:58 +00:00
Anton Korobeynikov c94dbf5ba0 Do not emit bit tests if target does not support natively left shift
llvm-svn: 71240
2009-05-08 18:51:34 +00:00
Anton Korobeynikov ea618dd0ba Allow 8 bit select in custom inserter
llvm-svn: 71239
2009-05-08 18:51:21 +00:00
Anton Korobeynikov e7a9661f31 Properly expand libcalls for urem / srem. Also make code more straightforward.
llvm-svn: 71238
2009-05-08 18:51:08 +00:00
Anton Korobeynikov e2b78115d4 Typo
llvm-svn: 71237
2009-05-08 18:50:54 +00:00
Anton Korobeynikov 1484cfe945 Expand UREM / SREM into libcalls
llvm-svn: 71236
2009-05-08 18:50:41 +00:00
Anton Korobeynikov c3e1b392ae Add 8 bit select
llvm-svn: 71235
2009-05-08 18:50:26 +00:00
Anton Korobeynikov 2f910827eb Provide dummy va_list typedef for msp430
llvm-svn: 71233
2009-05-08 18:24:57 +00:00
Chris Lattner f1d9b91434 Fix PR4152: asm constraint validation happens before dag combine, so we
need to work a bit to combine things like (x+c1+c2) into x+c3.

llvm-svn: 71232
2009-05-08 18:23:14 +00:00
Duncan Sands 0267955467 Add some examples to show the difference between
the various notions of type size used in LLVM.

llvm-svn: 71230
2009-05-08 17:49:48 +00:00
Chris Lattner 96afab520b further improvements to gnu objc EH stuff, patch by David Chisnall!
llvm-svn: 71227
2009-05-08 17:36:08 +00:00
Chris Lattner 8bbd76b031 Change 'make install' to install tblgen, for better support of out-of-tree targets,
patch by Mikael Lepistö!

llvm-svn: 71226
2009-05-08 17:32:47 +00:00
Chris Lattner c48091f141 fix RewriteStoreUserOfWholeAlloca to use the correct type size
method, fixing a crash on PR4146.  While the store will 
ultimately overwrite the "padded size" number of bits in memory,
the stored value may be a subset of this size.  This function
only wants to handle the case where all bits are stored.

llvm-svn: 71224
2009-05-08 15:54:41 +00:00
Chris Lattner a02cb80f99 "This patch fixes message sends to super in categories for the GNU runtime. This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes."
Patch by David Chisnall!

llvm-svn: 71220
2009-05-08 15:39:58 +00:00
Chris Lattner 5b9241b2a6 Fix the atomics sema code to convert operands to the argument types
of the underlying _N builtin, not the the type of the pointee of the
actual type.  This ensures that atomics involving pointers end up
using the correct integer type when they are resolved, avoiding
aborts in codegen.

llvm-svn: 71218
2009-05-08 15:36:58 +00:00
Ted Kremenek 062c14ba24 Remove experimental ownership attributes from Clang.
llvm-svn: 71216
2009-05-08 15:19:25 +00:00
Evan Cheng 5b9b33bcac Reverse branch condition only when there is a conditional branch.
llvm-svn: 71214
2009-05-08 09:35:53 +00:00
Zhongxing Xu d2e8fa14df Region store: when casting VarRegions, if the cast-to pointee type is
incomplete, do not compute its size and return the original region.

llvm-svn: 71213
2009-05-08 07:28:25 +00:00
Chris Lattner dc04654697 reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use.  This implements the variadic
and concrete versions as builtins and has sema do the 
disambiguation.  There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)

llvm-svn: 71212
2009-05-08 06:58:22 +00:00
Nick Lewycky b873ed672d Add explicit braces to disambiguate nested if/else. Removes a warning.
llvm-svn: 71211
2009-05-08 06:57:41 +00:00
Nick Lewycky 702fbf94a0 This transform requires valid TargetData info. Wrap it in 'if (TD)' in
preparation for the day we use null TargetData when no target is specified.

llvm-svn: 71210
2009-05-08 06:47:37 +00:00
Evan Cheng 2fa281106a Optimize code placement in loop to eliminate unconditional branches or move unconditional branch to the outside of the loop. e.g.
///       A:                                                                                                                                                                 
///       ...                                                                                                                                                                
///       <fallthrough to B>                                                                                                                                                 
///                                                                                                                                                                          
///       B:  --> loop header                                                                                                                                                
///       ...                                                                                                                                                                
///       jcc <cond> C, [exit]                                                                                                                                               
///                                                                                                                                                                          
///       C:                                                                                                                                                                 
///       ...                                                                                                                                                                
///       jmp B                                                                                                                                                              
///                                                                                                                                                                          
/// ==>                                                                                                                                                                      
///                                                                                                                                                                          
///       A:                                                                                                                                                                 
///       ...                                                                                                                                                                
///       jmp B                                                                                                                                                              
///                                                                                                                                                                          
///       C:  --> new loop header                                                                                                                                            
///       ...                                                                                                                                                                
///       <fallthough to B>                                                                                                                                                  
///                                                                                                                                                                          
///       B:                                                                                                                                                                 
///       ...                                                                                                                                                                
///       jcc <cond> C, [exit] 

llvm-svn: 71209
2009-05-08 06:34:09 +00:00
Nick Lewycky 2f6bddd2b1 Add missing #include for "strlen" which is used inline in this header. Fixes
build under gcc 4.3.

llvm-svn: 71208
2009-05-08 06:22:25 +00:00
Sanjiv Gupta 89e72b9c4a Moved pic16 naming functions to correct place.
No functionality change.

llvm-svn: 71207
2009-05-08 04:50:14 +00:00
Zhongxing Xu afc875c766 Replace the heuristic isSmallerThan with ASTContext::getTypeSize().
llvm-svn: 71206
2009-05-08 02:12:59 +00:00
Zhongxing Xu c0c074655d Replace getTypeWidth() with ASTContext::getTypeSize().
llvm-svn: 71205
2009-05-08 02:00:55 +00:00
Zhongxing Xu 1ba79dfeea Revert r71079.
llvm-svn: 71202
2009-05-08 01:33:18 +00:00
Daniel Dunbar 766004f179 Add various other bits I use to run ABITest.
llvm-svn: 71201
2009-05-08 00:49:21 +00:00
Ted Kremenek 3975f17f04 Fix <rdar://problem/6845148>. Signed integers compared against pointers should
implicitly be changed to unsigned values in GRSimpleVals.cpp. This can happen
when the comparison involves logic in specialized transfer functions (e.g.,
OSAtomicCompareAndSwap).

llvm-svn: 71200
2009-05-08 00:32:39 +00:00
Eli Friedman 36b9026fa7 PR4123: don't crash when inlining a call which uses its own result.
llvm-svn: 71199
2009-05-08 00:22:04 +00:00