summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach globalopt how to evaluate an invoke with a non-void return type.Dan Gohman2012-03-131-5/+6
| | | | llvm-svn: 152634
* Generalize the "trunc(ptrtoint(x)) - trunc(ptrtoint(y)) ->Duncan Sands2012-03-131-14/+34
| | | | | | trunc(ptrtoint(x-y))" optimization introduced by Chandler. llvm-svn: 152626
* Uniformize the InstructionSimplify interface by ensuring that all routinesDuncan Sands2012-03-132-337/+278
| | | | | | | | take a TargetLibraryInfo parameter. Internally, rather than passing TD, TLI and DT parameters around all over the place, introduce a struct for holding them. llvm-svn: 152623
* Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted ↵Eli Bendersky2012-03-1314-60/+677
| | | | | | | | | | | code in LLVM. Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code. In addition, unit tests for the profiling interfaces were added. This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach llvm-svn: 152620
* Add a return type.Bill Wendling2012-03-131-1/+1
| | | | llvm-svn: 152614
* Inline the d'tor and add an anchor instead.Bill Wendling2012-03-131-1/+1
| | | | llvm-svn: 152613
* Refactor the SelectionDAG's 'dump' methods into their own .cpp file.Bill Wendling2012-03-133-633/+632
| | | | | | No functionality change. llvm-svn: 152611
* Fixed typo in comment.Lang Hames2012-03-131-1/+1
| | | | llvm-svn: 152610
* Fix regression from r151466: an we can't replace uses of an instruction ↵Eli Friedman2012-03-131-3/+7
| | | | | | reachable from the entry block with uses of an instruction not reachable from the entry block. PR12231. llvm-svn: 152595
* Address some review comments from Duncan. This moves the iterativeChandler Carruth2012-03-131-32/+23
| | | | | | | | | | | | | | | | | | | offset accumulation to use a boring APInt instead of ConstantExprs. I didn't go all the way to an 'int64_t' because I wanted APInt to handle any magic required to properly wrap the arithmetic when the pointer width is <64 bits. If there is a significant penalty from using APInt here, first off WTF, and secondly let me know and I'll do the math by hand. I've left one layer still operating w/ ConstantExpr because it makes the interface quite a bit simpler, and that one isn't iterative so has much lower cost. I suppose this may potentially speed up some strang compilation situations, but I don't really expect much. It should have no functional impact either way. llvm-svn: 152590
* Added a missing error check for X86 assembly with mismatched base and indexKevin Enderby2012-03-121-0/+19
| | | | | | registers not both being 64-bit or both being 32-bit registers. llvm-svn: 152580
* Inline a trivial helper function.Benjamin Kramer2012-03-121-7/+3
| | | | llvm-svn: 152577
* Revert due to nightly test failures.Bill Wendling2012-03-121-82/+32
| | | | | | | --- Reverse-merging r152486 into '.': U lib/CodeGen/SjLjEHPrepare.cpp llvm-svn: 152571
* When inlining a function and adding its inner call sites to theChandler Carruth2012-03-121-1/+35
| | | | | | | | | | | | | | candidate set for subsequent inlining, try to simplify the arguments to the inner call site now that inlining has been performed. The goal here is to propagate and fold constants through deeply nested call chains. Without doing this, we loose the inliner bonus that should be applied because the arguments don't match the exact pattern the cost estimator uses. Reviewed on IRC by Benjamin Kramer. llvm-svn: 152556
* Teach instsimplify how to constant fold pointer differences.Chandler Carruth2012-03-121-0/+122
| | | | | | | | | | | | | | | | | | | Typically instcombine has handled this, but pointer differences show up in several contexts where we would like to get constant folding, and cannot afford to run instcombine. Specifically, I'm working on improving the constant folding of arguments used in inline cost analysis with instsimplify. Doing this in instsimplify implies some algorithm changes. We have to handle multiple layers of all-constant GEPs because instsimplify cannot fold them into a single GEP the way instcombine can. Also, we're only interested in all-constant GEPs. The result is that this doesn't really replace the instcombine logic, it's just complimentary and focused on constant folding. Reviewed on IRC by Benjamin Kramer. llvm-svn: 152555
* Don't cast away constant qualifier.Duncan Sands2012-03-121-1/+1
| | | | llvm-svn: 152553
* Switch to unified syntax for VFP instructions in inline assembly.Bob Wilson2012-03-121-2/+2
| | | | | | <rdar://problem/11024696> llvm-svn: 152548
* Replace a hand-coded leading one counting loop with the magic from MathExtras.h.Benjamin Kramer2012-03-111-8/+1
| | | | llvm-svn: 152545
* Remove global map. This code isn't even hot.Benjamin Kramer2012-03-111-38/+28
| | | | llvm-svn: 152544
* DwarfDebug: Store the filename/dirname pair as a zero-separated string in a ↵Benjamin Kramer2012-03-112-15/+13
| | | | | | stringmap, instead of using a highly inefficient std::map of a pair of std::strings. llvm-svn: 152541
* Convert more static tables of registers used by calling convention to ↵Craig Topper2012-03-1110-35/+35
| | | | | | uint16_t to reduce space. llvm-svn: 152538
* Use uint16_t to store registers and opcode in static tables in the target ↵Craig Topper2012-03-119-35/+35
| | | | | | specific backends. llvm-svn: 152537
* Remove unused functions getArgRegs and getNumArgRegs.Craig Topper2012-03-112-23/+0
| | | | llvm-svn: 152535
* llvm::SwitchInstStepan Dyatkovskiy2012-03-1117-35/+35
| | | | | | | Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152532
* Make StringRef::getAsInteger work with all integer types. Before this changeMichael J. Spencer2012-03-101-29/+7
| | | | | | | | it would fail with {,u}int64_t on x86-64 Linux. This also removes code duplication. llvm-svn: 152517
* Make helper static, so it can be inlined into its sole caller.Benjamin Kramer2012-03-101-3/+3
| | | | llvm-svn: 152515
* *fix typo in comment; test of commit accessKay Tiong Khoo2012-03-101-1/+1
| | | | llvm-svn: 152507
* As Duncan pointed out, pointers tend not to be in floating point ↵Bill Wendling2012-03-101-6/+6
| | | | | | format...for now. llvm-svn: 152499
* Make this transformation slightly less agressive and more correct.Bill Wendling2012-03-101-8/+18
| | | | | | | | | | | The 'CmpInst::isFalseWhenEqual' function returns 'false' for values other than simply equality. For instance, it returns 'false' for <= or >=. This isn't the correct behavior for this transformation, which is checking for strict equality and non-equality. It was causing the gcc.c-torture/execute/frame-address.c test to fail because it would completely (and incorrectly) optimize a whole function into a 'ret i32 0'. llvm-svn: 152497
* C files in llvm still have to be C89 compliant, remove C++-style comments.Benjamin Kramer2012-03-101-4/+6
| | | | llvm-svn: 152495
* Microoptimize getVRegDef. def_begin isn't free, don't compute it twice.Benjamin Kramer2012-03-101-3/+2
| | | | llvm-svn: 152492
* Refactor some methods to look through bitcasts and GEPs on pointers intoChandler Carruth2012-03-102-31/+45
| | | | | | | | | | a common collection of methods on Value, and share their implementation. We had two variations in two different places already, and I need the third variation for inline cost estimation. Reviewed by Duncan Sands on IRC, but further comments here welcome. llvm-svn: 152490
* Fix disasm of iret, sysexit, and sysret when displayed with Intel syntax.Bill Wendling2012-03-101-5/+5
| | | | | | Patch by Kay Tiong Khoo! llvm-svn: 152487
* Implement a more intelligent way of spilling uses across an invoke boundary.Bill Wendling2012-03-101-32/+82
| | | | | | | | | | | | | The old way of determine when and where to spill a value that was used inside of a landing pad resulted in spilling that value everywhere and not just at the invoke edge. This algorithm determines which values are used within a landing pad. It then spills those values before the invoke and reloads them before the uses. This should prevent excessive spilling in many cases, e.g. inside of loops. <rdar://problem/10609139> llvm-svn: 152486
* Report the defining instruction.Jakob Stoklund Olesen2012-03-101-4/+3
| | | | llvm-svn: 152460
* Add SSA verification to MachineVerifier.Jakob Stoklund Olesen2012-03-101-2/+12
| | | | | | Somehow we never verified SSA dominance before. llvm-svn: 152458
* Use SmallPtrSet instead of DenseSet.Jakob Stoklund Olesen2012-03-101-3/+4
| | | | llvm-svn: 152457
* Give dagcombiner's worklist some inline capacity.Benjamin Kramer2012-03-101-3/+2
| | | | llvm-svn: 152454
* Do not custom lower i64 nodes if i64 is not a legal type. Move lines that setAkira Hatanaka2012-03-101-11/+14
| | | | | | operation action of nodes. llvm-svn: 152452
* Lower SETCC nodes during legalization. Previously, it was lowered in DAG ↵Akira Hatanaka2012-03-092-20/+16
| | | | | | combine pass. llvm-svn: 152450
* Assert on SSA errors in LiveVariables.Jakob Stoklund Olesen2012-03-091-0/+1
| | | | | | All uses of a virtual register must be dominated by its def. llvm-svn: 152449
* Remove unused header files.Akira Hatanaka2012-03-091-2/+0
| | | | llvm-svn: 152447
* misched: handle scheduler that insert instructions at empty region boundaries.Andrew Trick2012-03-091-3/+12
| | | | | | And add comments, since this is obviously confusing. llvm-svn: 152445
* Add the missing call to Error when a bad X86 scale expression is parsed.Kevin Enderby2012-03-091-1/+3
| | | | llvm-svn: 152443
* [Object]David Meyer2012-03-093-3/+3
| | | | | | Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big llvm-svn: 152435
* Add statistics on removed switch cases, and fix the phi statisticDuncan Sands2012-03-091-1/+5
| | | | | | to count the number of phis changed, not the number visited. llvm-svn: 152425
* When identifying exit nodes for the reverse-CFG reverse-post-orderDan Gohman2012-03-091-2/+8
| | | | | | | | | traversal, consider nodes for which the only successors are backedges which the traversal is ignoring to be exit nodes. This fixes a problem where the bottom-up traversal was failing to visit split blocks along split loop backedges. This fixes rdar://10989035. llvm-svn: 152421
* Fix the x86 disassembler to at least print the lock prefix if it is the firstKevin Enderby2012-03-091-0/+7
| | | | | | | prefix. Added a FIXME to remind us this still does not work when it is not the first prefix. llvm-svn: 152414
* Eliminate switch cases that can never match, for example removes allDuncan Sands2012-03-091-0/+86
| | | | | | | negative switch cases if the branch condition is known to be positive. Inspired by a recent improvement to GCC's VRP. llvm-svn: 152405
* Add support for r600 (AMD GPUs HD2XXX - HD6XXX) target triplet.Anton Korobeynikov2012-03-091-0/+10
| | | | | | Patch by Tom Stellard! llvm-svn: 152400
OpenPOWER on IntegriCloud