Commit Graph

43120 Commits

Author SHA1 Message Date
Ted Kremenek 21bf6006b0 For case statements involving enums, BugReporter now generates PathDiagnostics
that say that we are jumping to "case a" instead of "case 0".

This is a feature implementation for <rdar://problem/5880430>.

llvm-svn: 50197
2008-04-23 23:35:07 +00:00
Dan Gohman c107d0020d Make these variables static.
llvm-svn: 50196
2008-04-23 23:15:23 +00:00
Ted Kremenek 05e6267466 Fix minor regression in bug report generation.
llvm-svn: 50195
2008-04-23 23:04:32 +00:00
Ted Kremenek f26bc55b9a When building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with a single path that BugReport objects can safely walk and introspect.
llvm-svn: 50194
2008-04-23 23:02:12 +00:00
Anton Korobeynikov 8bfd6de8db Disable building of llvm2cpp. The directory will be removed before 2.3 release.
llvm-svn: 50193
2008-04-23 22:46:24 +00:00
Anton Korobeynikov 1ae135c87b Drop dead includes
llvm-svn: 50192
2008-04-23 22:44:03 +00:00
Anton Korobeynikov 3aec21fa0e Fix tests due to llvm2cpp move to llc target
llvm-svn: 50191
2008-04-23 22:41:53 +00:00
Anton Korobeynikov 9dcc3e97a4 Adjust option names for C++ backend
llvm-svn: 50190
2008-04-23 22:37:03 +00:00
Anton Korobeynikov 78695035c4 First step of implementing PR1538: move llvm2cpp logic to new 'target'
llvm-svn: 50189
2008-04-23 22:29:24 +00:00
Dan Gohman d871fa5cb6 Initial CBE support for multiple return values.
llvm-svn: 50187
2008-04-23 21:49:29 +00:00
Chris Lattner 1e31bf5b19 tighten up verifier checks which missed cases where
return instrs operands didn't match up with function results.

llvm-svn: 50182
2008-04-23 20:33:41 +00:00
Dan Gohman e9e3891c09 Use isa instead of dyn_cast.
llvm-svn: 50181
2008-04-23 20:25:16 +00:00
Dan Gohman b418aafabf Add support to codegen for getresult instructions with undef operands.
llvm-svn: 50180
2008-04-23 20:21:29 +00:00
Devang Patel 8f83081fea Check type instead of no. of operands.
llvm-svn: 50179
2008-04-23 20:18:29 +00:00
Ted Kremenek dd43aeee54 Fixed: <rdar://problem/5881148>
Problem:

In the recently refactored VisitDeref (which processes dereferences), we
were incorrectly skipping the node just generated for the subexpression
of the dereference.  This was a horrible regression.

llvm-svn: 50176
2008-04-23 20:12:28 +00:00
Dan Gohman 6e9185093d Allow llvm-as to parse a getresult with an undef operand.
llvm-svn: 50175
2008-04-23 20:11:27 +00:00
Dale Johannesen f6e15a4774 Rewrite previous patch to suit Chris's preference.
llvm-svn: 50174
2008-04-23 18:34:37 +00:00
Anton Korobeynikov 0516b6f2b0 Unbreak JIT
llvm-svn: 50173
2008-04-23 18:26:03 +00:00
Anton Korobeynikov dd4ef2e30c Disable stack realignment for these tests
llvm-svn: 50172
2008-04-23 18:25:44 +00:00
Anton Korobeynikov c3ada5c9c4 Fix test becase ABI stack alignment dropped to 'normal' value
llvm-svn: 50171
2008-04-23 18:25:16 +00:00
Anton Korobeynikov 955a8a9101 Fix test, instruction count is valid only if stack is not realigned
llvm-svn: 50170
2008-04-23 18:24:48 +00:00
Anton Korobeynikov 0d6df367f1 Fix typo
llvm-svn: 50169
2008-04-23 18:24:25 +00:00
Anton Korobeynikov 965babda19 Only allow increase of max alignment value
llvm-svn: 50168
2008-04-23 18:23:50 +00:00
Anton Korobeynikov c1534dca56 Be over-conservative: scan for all used virtual registers and calculate maximal stack alignment in assumption, that there will be spill of vector register.
llvm-svn: 50167
2008-04-23 18:23:30 +00:00
Anton Korobeynikov 2659011b70 Add X86 Maximal Stack Alignment Calculator Pass before RA
llvm-svn: 50166
2008-04-23 18:23:05 +00:00
Anton Korobeynikov 7e859dd7f0 Add facility for pre-RA passes
llvm-svn: 50165
2008-04-23 18:22:28 +00:00
Anton Korobeynikov 41334635cc Use precomputed value, if any
llvm-svn: 50164
2008-04-23 18:21:50 +00:00
Anton Korobeynikov 156550ae79 Do proper book-keeping of offsets and prologue/epilogue code for stack realignment
llvm-svn: 50163
2008-04-23 18:21:27 +00:00
Anton Korobeynikov 89a0a017fb If stack realignment is used - incoming args will use EBP as base register and locals - ESP
llvm-svn: 50162
2008-04-23 18:21:02 +00:00
Anton Korobeynikov ba5129073c Eastimate required stack alignment early, so we can decide, whether we will need frame pointer or not
llvm-svn: 50161
2008-04-23 18:20:17 +00:00
Anton Korobeynikov f49bc9f8ed Cleanup
llvm-svn: 50160
2008-04-23 18:19:47 +00:00
Anton Korobeynikov c756b460d9 Cleanup
llvm-svn: 50159
2008-04-23 18:19:23 +00:00
Anton Korobeynikov a8aac3db3f Simplify
llvm-svn: 50158
2008-04-23 18:18:36 +00:00
Anton Korobeynikov cb195f511d Make stack alignment options global for all targets
llvm-svn: 50157
2008-04-23 18:18:10 +00:00
Anton Korobeynikov 9328fbc4c7 Provide option for enabling-disabling stack realignment
llvm-svn: 50156
2008-04-23 18:17:11 +00:00
Anton Korobeynikov ca150edda6 Disable stack realignment for functions with dynamic-sized alloca's
llvm-svn: 50155
2008-04-23 18:16:43 +00:00
Anton Korobeynikov a7495260ee Provide ABI-correct stack alignment
llvm-svn: 50154
2008-04-23 18:16:16 +00:00
Anton Korobeynikov 8843487e16 Provide convenient helpers for some operations
llvm-svn: 50153
2008-04-23 18:15:48 +00:00
Anton Korobeynikov 2ccafa47ac Whitespace cleanup
llvm-svn: 50152
2008-04-23 18:15:11 +00:00
Dan Gohman 3c43d2e18a Fix some whitespace.
llvm-svn: 50151
2008-04-23 17:50:15 +00:00
Ted Kremenek 467297ab48 TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
when it is constructed via deserialization.  This is done by recording a flag
indicating that this is the case, and it deletes these objects by getting
the references stored in the ASTContext object.  This fixes some memory
leaks that occurs when we deserialize translation units from bitcode files.

The rationale between having TranslationUnit sometimes own these objects and
sometimes not is that a TranslationUnit object can be constructed from
state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus
in these cases won't own the IdentifierTable or Selectors, etc.  During
deserialization, there is no Preprocessor, so somebody needs to own these
objects in order for them to be properly reclaimed.

llvm-svn: 50149
2008-04-23 16:25:39 +00:00
Bill Wendling 107d369b8b Use the Create static method for some of these objects. They no longer
have public constructors. This should fix PR2246.

llvm-svn: 50145
2008-04-23 07:13:17 +00:00
Chris Lattner a82d691caa simplify code for propagation of constant arguments into
callees.

llvm-svn: 50142
2008-04-23 06:16:27 +00:00
Chris Lattner 5f1802cfdf Fix a number of bugs in ipconstantprop, simplify the code, fit in 80 cols,
fix read after free bug (PR2238).

llvm-svn: 50141
2008-04-23 05:59:23 +00:00
Chris Lattner 5a58a4dc6d Rewrite multiple return value handling in SCCP. Before, the -sccp pass
would turn every getresult instruction into undef.  This helps with
rdar://5778210

llvm-svn: 50140
2008-04-23 05:38:20 +00:00
Chris Lattner 6e0284bba7 regenerate
llvm-svn: 50139
2008-04-23 05:37:08 +00:00
Chris Lattner ff9089eb90 Validate that the result of a function type is valid using shared
logic with vmcore.

llvm-svn: 50138
2008-04-23 05:36:58 +00:00
Chris Lattner b6917d2acc Enforce that multiple return values have to have at least one result.
llvm-svn: 50137
2008-04-23 05:36:34 +00:00
Chris Lattner 14f41bfc49 remove this testcase. It isn't testing loop rotate, it is testing all
of -std-compile-opts and is now failing because other passes are generating
IR that looks different to input of loop rotate.  Devang, please 
introduce a testcase that only runs loop rotate.

llvm-svn: 50136
2008-04-23 05:36:04 +00:00
Chris Lattner f9a4e4d723 returning an empty multiple return list is not valid.
llvm-svn: 50135
2008-04-23 05:29:14 +00:00