Xerxes Ranby [Sun, 19 Jul 2009 08:10:01 +0000 (08:10 +0000)]
Fix: Kaleidoscope link in JIT and Interpreter by including JIT.h and Interpreter.h
llvm-svn: 76363
Daniel Dunbar [Sun, 19 Jul 2009 07:03:11 +0000 (07:03 +0000)]
Fix thinko.
llvm-svn: 76362
Daniel Dunbar [Sun, 19 Jul 2009 06:58:07 +0000 (06:58 +0000)]
Avoid generation of dead code in a few more situations.
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361
Nick Lewycky [Sun, 19 Jul 2009 03:44:35 +0000 (03:44 +0000)]
Fix ConstantRange::unionWith. Also make it work a little hard in some cases to
return the smallest union of two ranges instead of just any range that happens
to contain the union.
llvm-svn: 76360
Daniel Dunbar [Sun, 19 Jul 2009 02:17:34 +0000 (02:17 +0000)]
Add include needed for MSVC.
llvm-svn: 76359
Daniel Dunbar [Sun, 19 Jul 2009 01:42:34 +0000 (01:42 +0000)]
Remove redundant qualifiers.
llvm-svn: 76357
Daniel Dunbar [Sun, 19 Jul 2009 01:38:38 +0000 (01:38 +0000)]
Fix some minor MSVC compiler warnings.
llvm-svn: 76356
Daniel Dunbar [Sun, 19 Jul 2009 01:35:10 +0000 (01:35 +0000)]
MSVC: Disable 4351, a completely useless warning: "warning: I'm not miscompiling
this". Um, ok, thanks!
llvm-svn: 76355
Daniel Dunbar [Sun, 19 Jul 2009 01:33:04 +0000 (01:33 +0000)]
Unbreak build
llvm-svn: 76354
Eli Friedman [Sun, 19 Jul 2009 01:11:32 +0000 (01:11 +0000)]
Switch Alpha over to the new call lowering style. New code mostly
copied from the SystemZ target. I don't think this causes any
significant changes to the output (I compared the assembly, and the
results appeared to be essentially unchanged), although I don't actually
have an Alpha to test on.
I would appreciate if anyone with the appropriate hardware could test
this. I'm not sure if that includes anyone subscribed to llvm-commits,
though.
llvm-svn: 76353
Daniel Dunbar [Sun, 19 Jul 2009 00:46:44 +0000 (00:46 +0000)]
SystemZ *does* have a CodeGen/AsmPrinter split.
- What it doesn't have is the rest of its cmake files...
llvm-svn: 76352
Daniel Dunbar [Sun, 19 Jul 2009 00:40:45 +0000 (00:40 +0000)]
Update CMake
llvm-svn: 76351
Daniel Dunbar [Sun, 19 Jul 2009 00:26:46 +0000 (00:26 +0000)]
Tweak cmake files for the four targets that don't split CodeGen out.
- We should canonicalize this and get rid of the cmake and llvm-config hacks to
support both variants.
llvm-svn: 76350
Daniel Dunbar [Sun, 19 Jul 2009 00:21:12 +0000 (00:21 +0000)]
Add dependencies from TargetInfo onto .td generation.
- Shouldn't really be necessary, but currently .inc files get included into
some main target headers.
llvm-svn: 76349
Anders Carlsson [Sun, 19 Jul 2009 00:18:47 +0000 (00:18 +0000)]
Handle layout of non-virtual base classes.
llvm-svn: 76348
Bruno Cardoso Lopes [Sat, 18 Jul 2009 23:24:01 +0000 (23:24 +0000)]
Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
llvm-svn: 76347
Daniel Dunbar [Sat, 18 Jul 2009 23:22:46 +0000 (23:22 +0000)]
Add some missing includes.
llvm-svn: 76346
Eli Friedman [Sat, 18 Jul 2009 23:06:53 +0000 (23:06 +0000)]
Canonicalize bitcasts between types like <1 x i64> and i64 to
insertelement/extractelement.
I'm not entirely sure this is precisely what we want to do: should we
prefer bitcast(insertelement) or insertelement(bitcast)? Similarly. should we
prefer extractelement(bitcast) or bitcast(extractelement)?
llvm-svn: 76345
Daniel Dunbar [Sat, 18 Jul 2009 23:03:22 +0000 (23:03 +0000)]
Put Target definitions inside Target specific header, and llvm namespace.
llvm-svn: 76344
Anders Carlsson [Sat, 18 Jul 2009 21:48:39 +0000 (21:48 +0000)]
Refactor field layout into a separate function.
llvm-svn: 76343
Chris Lattner [Sat, 18 Jul 2009 21:47:15 +0000 (21:47 +0000)]
fix some typos pointed out by Hidenobu Seki
llvm-svn: 76342
Mikhail Glushenkov [Sat, 18 Jul 2009 21:43:40 +0000 (21:43 +0000)]
Add a Program::GetPid() method.
llvm-svn: 76341
Mikhail Glushenkov [Sat, 18 Jul 2009 21:43:12 +0000 (21:43 +0000)]
Remove duplication in Program::Execute{And,No}Wait.
Implemented by moving the code out of static functions into methods of Program
class.
llvm-svn: 76340
Anders Carlsson [Sat, 18 Jul 2009 21:26:44 +0000 (21:26 +0000)]
Rename NextOffset to DataSize, which better matches the Itanium C++ ABI
llvm-svn: 76339
Anders Carlsson [Sat, 18 Jul 2009 21:19:52 +0000 (21:19 +0000)]
Migrate over to the record layout builder.
llvm-svn: 76338
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:18:10 +0000 (21:18 +0000)]
Re-enable 'test/SemaTemplate/temp_class_spec_neg.cpp', after commenting out the cause of the crash.
llvm-svn: 76337
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:17:58 +0000 (21:17 +0000)]
Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
llvm-svn: 76336
Argyrios Kyrtzidis [Sat, 18 Jul 2009 21:17:43 +0000 (21:17 +0000)]
Handle invalid ASTLocations instead of asserting.
llvm-svn: 76335
Bruno Cardoso Lopes [Sat, 18 Jul 2009 20:52:11 +0000 (20:52 +0000)]
Use a better name for the label relocations while emitting them for Jump Tables
llvm-svn: 76334
Anders Carlsson [Sat, 18 Jul 2009 20:50:59 +0000 (20:50 +0000)]
More layout builder work.
llvm-svn: 76333
Anders Carlsson [Sat, 18 Jul 2009 20:20:21 +0000 (20:20 +0000)]
Add a new ASTRecordLayoutBuilder class. Not used yet.
llvm-svn: 76330
Daniel Dunbar [Sat, 18 Jul 2009 20:10:04 +0000 (20:10 +0000)]
cmake builds don't need this hack for MSVC anymore.
llvm-svn: 76329
Daniel Dunbar [Sat, 18 Jul 2009 19:55:20 +0000 (19:55 +0000)]
Disable this test for now, it has been crashing on linux for weeks.
llvm-svn: 76328
Anders Carlsson [Sat, 18 Jul 2009 19:43:29 +0000 (19:43 +0000)]
Revert r75641.
llvm-svn: 76327
Bruno Cardoso Lopes [Sat, 18 Jul 2009 19:30:09 +0000 (19:30 +0000)]
Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata
sections).
llvm-svn: 76326
Eli Friedman [Sat, 18 Jul 2009 19:04:16 +0000 (19:04 +0000)]
Back out 76300; apparently the preference is to canonicalize the other
way (bitcast -> insert/extractelement).
llvm-svn: 76325
Chris Lattner [Sat, 18 Jul 2009 18:49:04 +0000 (18:49 +0000)]
add a fixme
llvm-svn: 76324
Viktor Kutuzov [Sat, 18 Jul 2009 18:39:24 +0000 (18:39 +0000)]
Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
llvm-svn: 76323
Steve Naroff [Sat, 18 Jul 2009 15:38:31 +0000 (15:38 +0000)]
Fix typo from r76321.
llvm-svn: 76322
Steve Naroff [Sat, 18 Jul 2009 15:33:26 +0000 (15:33 +0000)]
Remove ObjCQualifiedInterfaceType:-)
llvm-svn: 76321
Sebastian Redl [Sat, 18 Jul 2009 15:13:36 +0000 (15:13 +0000)]
Fix RUN line to not litter the test directory.
llvm-svn: 76320
Sebastian Redl [Sat, 18 Jul 2009 15:09:16 +0000 (15:09 +0000)]
svn:ignore the build directories
llvm-svn: 76319
Sebastian Redl [Sat, 18 Jul 2009 15:08:18 +0000 (15:08 +0000)]
Rename file in preparation of properly implementing C-style casts in C++.
llvm-svn: 76318
Sebastian Redl [Sat, 18 Jul 2009 14:32:15 +0000 (14:32 +0000)]
Enhance testing of overriding exception specs for inaccessible base exceptions.
llvm-svn: 76317
Anton Korobeynikov [Sat, 18 Jul 2009 14:16:06 +0000 (14:16 +0000)]
Add carry producing / using versions of add / sub
llvm-svn: 76316
Anton Korobeynikov [Sat, 18 Jul 2009 13:44:25 +0000 (13:44 +0000)]
Expand frem
llvm-svn: 76315
Anton Korobeynikov [Sat, 18 Jul 2009 13:34:59 +0000 (13:34 +0000)]
Turn abort() into unreachable
llvm-svn: 76314
Anton Korobeynikov [Sat, 18 Jul 2009 13:33:17 +0000 (13:33 +0000)]
Turn few asserts into errors / unreachable's
llvm-svn: 76313
Anton Korobeynikov [Sat, 18 Jul 2009 12:51:06 +0000 (12:51 +0000)]
Handle vector returns
llvm-svn: 76312
Anton Korobeynikov [Sat, 18 Jul 2009 12:26:13 +0000 (12:26 +0000)]
Provide expansion for ct* intrinsics
llvm-svn: 76311
Anton Korobeynikov [Sat, 18 Jul 2009 12:20:36 +0000 (12:20 +0000)]
Expand sext_inreg for i1
llvm-svn: 76310
Eli Friedman [Sat, 18 Jul 2009 09:53:21 +0000 (09:53 +0000)]
Add combine: X sdiv (1 << Y) -> X udiv (1 << Y) when X doesn't have the
sign bit set.
llvm-svn: 76304
Zhongxing Xu [Sat, 18 Jul 2009 09:26:51 +0000 (09:26 +0000)]
Fix a comment.
llvm-svn: 76303
Eli Friedman [Sat, 18 Jul 2009 09:21:25 +0000 (09:21 +0000)]
Remove no-op check.
llvm-svn: 76302
Eli Friedman [Sat, 18 Jul 2009 09:12:15 +0000 (09:12 +0000)]
Remove dead check.
llvm-svn: 76301
Eli Friedman [Sat, 18 Jul 2009 09:07:47 +0000 (09:07 +0000)]
Canonicalize insert/extractelement from single-element vectors into
bitcasts.
It would also be possible to canonicalize the other way; does anyone
have a preference?
llvm-svn: 76300
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:48 +0000 (08:50 +0000)]
Fix a comment.
llvm-svn: 76299
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:35 +0000 (08:50 +0000)]
Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.
llvm-svn: 76298
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:50:13 +0000 (08:50 +0000)]
Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
Make FunctionDecl and VarDecl use it.
llvm-svn: 76297
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:49:56 +0000 (08:49 +0000)]
Remove StmtLocResolver::VisitObjCIvarRefExpr, it was only there to avoid returning an implicit 'self' instead of the ivar.
Since implicit 'self' no longer has a source location, it's not needed. (plus we also want to check for a 'self' that is visible in source code)
llvm-svn: 76296
Argyrios Kyrtzidis [Sat, 18 Jul 2009 08:49:37 +0000 (08:49 +0000)]
Don't add a SourceLocation for 'self' if it does not actually appears in the source code.
llvm-svn: 76295
Zhongxing Xu [Sat, 18 Jul 2009 08:49:07 +0000 (08:49 +0000)]
Replace stmt visitors with the fall back method.
llvm-svn: 76294
Eli Friedman [Sat, 18 Jul 2009 08:34:51 +0000 (08:34 +0000)]
Fix simplifylibcalls memset recognition to work on 64-bit platforms
where int is 32 bits.
llvm-svn: 76293
Daniel Dunbar [Sat, 18 Jul 2009 08:07:13 +0000 (08:07 +0000)]
Switch lli back to using allocate-gvs-with-code behavior.
- Otherwise we get two regressions in llvm-test for applications which run out
of space.
- Once the JIT memory manager is improved, this can be switched back.
llvm-svn: 76291
Nick Lewycky [Sat, 18 Jul 2009 06:34:42 +0000 (06:34 +0000)]
Replace intersectWith with maximalIntersectWith. The latter guarantees that
all values belonging to the intersection will belong to the resulting range.
The former was inconsistent about that point (either way is fine, just pick
one.) This is part of PR4545.
llvm-svn: 76289
Ted Kremenek [Sat, 18 Jul 2009 06:27:51 +0000 (06:27 +0000)]
Fix crash in StoreManager::NewCastRegion() when handling casts from 'id' (or whatever) to a BlockPointerType.
llvm-svn: 76288
Ted Kremenek [Sat, 18 Jul 2009 06:27:01 +0000 (06:27 +0000)]
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.
llvm-svn: 76287
Daniel Dunbar [Sat, 18 Jul 2009 06:08:49 +0000 (06:08 +0000)]
Unbreak unittests build.
- Reid, please check, I'm not sure if this is what was intended.
llvm-svn: 76286
Eli Friedman [Sat, 18 Jul 2009 05:26:06 +0000 (05:26 +0000)]
Fix the inline cost calculation to take into account instructions
which cannot be folded even if they have constant operands. Significantly
helps if_spppsubr.c attached to PR4573.
llvm-svn: 76285
Eli Friedman [Sat, 18 Jul 2009 05:12:58 +0000 (05:12 +0000)]
Add line breaks to make the debug output a bit more readable.
llvm-svn: 76284
Ted Kremenek [Sat, 18 Jul 2009 05:02:33 +0000 (05:02 +0000)]
Add test case for bug fix in r76262.
llvm-svn: 76283
Evan Cheng [Sat, 18 Jul 2009 04:52:23 +0000 (04:52 +0000)]
Catch more coalescing opportunities.
llvm-svn: 76282
Evan Cheng [Sat, 18 Jul 2009 02:10:10 +0000 (02:10 +0000)]
Enable cross register class coalescing.
llvm-svn: 76281
Dan Gohman [Sat, 18 Jul 2009 01:49:22 +0000 (01:49 +0000)]
Make GetElementPtr ConstantExprs default to having no pointer overflow.
llvm-svn: 76280
Evan Cheng [Sat, 18 Jul 2009 01:43:53 +0000 (01:43 +0000)]
Revert 76177 for now. It's messing up ARM asm printing. Also this significant debate about its efficiency.
llvm-svn: 76279
Dan Gohman [Sat, 18 Jul 2009 00:58:38 +0000 (00:58 +0000)]
Fix this accidentally inverted condition.
llvm-svn: 76278
Ted Kremenek [Sat, 18 Jul 2009 00:47:21 +0000 (00:47 +0000)]
Fix some fallout from CFGBuilder restructuring: all expressions that we explicitly handle have the possibility to be block-level expressions.
llvm-svn: 76277
Reid Kleckner [Sat, 18 Jul 2009 00:42:18 +0000 (00:42 +0000)]
Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.
llvm-svn: 76276
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:35 +0000 (00:34 +0000)]
Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.
Their usefulness is questionable since redecl_iterator was introduced.
llvm-svn: 76275
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:25 +0000 (00:34 +0000)]
Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.
llvm-svn: 76274
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:34:07 +0000 (00:34 +0000)]
Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().
llvm-svn: 76273
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:52 +0000 (00:33 +0000)]
Resolve a location that is inside an ObjCMethodDecl.
llvm-svn: 76272
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:46 +0000 (00:33 +0000)]
Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.
llvm-svn: 76271
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:40 +0000 (00:33 +0000)]
Search through all Decls that are DeclContexts.
llvm-svn: 76270
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:33 +0000 (00:33 +0000)]
Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.
llvm-svn: 76269
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:23 +0000 (00:33 +0000)]
Location should be passed to setLocEnd() not to setAtEndLoc() which belongs to ObjCContainerDecl.
llvm-svn: 76268
Argyrios Kyrtzidis [Sat, 18 Jul 2009 00:33:08 +0000 (00:33 +0000)]
Add getSourceRange() methods for ObjC Decls.
llvm-svn: 76267
Chris Lattner [Fri, 17 Jul 2009 23:57:13 +0000 (23:57 +0000)]
fix objc codegen to not have its own list of things that eventually get into llvm.used, just
populate CGM's list directly.
llvm-svn: 76266
Dan Gohman [Fri, 17 Jul 2009 23:55:56 +0000 (23:55 +0000)]
Convert more code to use Operator instead of explicitly handling both
ConstantExpr and Instruction. This involves duplicating some code
between GetElementPtrInst and GEPOperator, but it's not a lot.
llvm-svn: 76265
Ted Kremenek [Fri, 17 Jul 2009 23:50:26 +0000 (23:50 +0000)]
Update CMake file.
llvm-svn: 76264
Chris Lattner [Fri, 17 Jul 2009 23:48:38 +0000 (23:48 +0000)]
This takes a long time to crash, just disable it for now.
llvm-svn: 76263
Ted Kremenek [Fri, 17 Jul 2009 23:48:26 +0000 (23:48 +0000)]
Fix caching bug revealed by analyzing ClamAV using RegionStore.
llvm-svn: 76262
Ted Kremenek [Fri, 17 Jul 2009 22:57:50 +0000 (22:57 +0000)]
Fix possible null dereference in CFG construction.
llvm-svn: 76261
Daniel Dunbar [Fri, 17 Jul 2009 22:51:20 +0000 (22:51 +0000)]
llvm-mc: Default -triple to LLVM_HOSTTRIPLE.
llvm-svn: 76260
Ted Kremenek [Fri, 17 Jul 2009 22:45:54 +0000 (22:45 +0000)]
Remove bogus check.
llvm-svn: 76259
Evan Cheng [Fri, 17 Jul 2009 22:42:51 +0000 (22:42 +0000)]
Fix pr4552. Stack slot coloring with register must take care not to generate illegal ams.
llvm-svn: 76258
Daniel Dunbar [Fri, 17 Jul 2009 22:38:58 +0000 (22:38 +0000)]
llvm-mc: Add -triple, and start fetching the target asm printer.
llvm-svn: 76257
Ted Kremenek [Fri, 17 Jul 2009 22:38:26 +0000 (22:38 +0000)]
Add error message when clang-cc cannot be found.
llvm-svn: 76256
Daniel Dunbar [Fri, 17 Jul 2009 22:35:35 +0000 (22:35 +0000)]
Add llvm::InitializeAllTargetInfos and llvm::InitializeAllAsmParsers.
llvm-svn: 76253
Dan Gohman [Fri, 17 Jul 2009 22:25:10 +0000 (22:25 +0000)]
Make BasicAliasAnalysis and Value::getUnderlyingObject use
GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine
that create GEPs that may overflow clear the NoOverflow value. Among
other things, this partially addresses PR2831.
llvm-svn: 76252