summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach SimplifyDemandedBits how to look through fpext and fptrunc to simplify ↵Pete Cooper2012-07-261-0/+6
| | | | | | their operand llvm-svn: 160823
* Eliminate more sub_ss / sub_sd patterns.Jakob Stoklund Olesen2012-07-261-32/+24
| | | | | | | This gets rid of some more INSERT_SUBREG - IMPLICIT_DEF patterns, simplifying the emitted code a bit. llvm-svn: 160820
* Eliminate some SUBREG_TO_REG patterns with sub_ss and sub_sd.Jakob Stoklund Olesen2012-07-261-12/+10
| | | | | | | | | The SUBREG_TO_REG instruction has magic semantics asserting that the source value was defined by an instruction that cleared the high half of the register. Those semantics are never actually exploited for xmm registers. llvm-svn: 160818
* Eliminate a batch of uses of sub_ss and sub_sd in the X86 target.Jakob Stoklund Olesen2012-07-261-82/+66
| | | | | | | | | | | | | | These idempotent sub-register indices don't do anything --- They simply map XMM registers to themselves. They no longer affect register classes either since the SubRegClasses field has been removed from Target.td. This patch replaces XMM->XMM EXTRACT_SUBREG and INSERT_SUBREG patterns with COPY_TO_REGCLASS patterns which simply become COPY instructions. The number of IMPLICIT_DEF instructions before register allocation is reduced, and that is the cause of the test case changes. llvm-svn: 160816
* Add support for v16i32/v16i64 into the code generator. This is required for ↵Micah Villmow2012-07-261-0/+8
| | | | | | backends that use i32/i64 vectors for the getSetCCResultType function. llvm-svn: 160814
* Make comments in Debug.cpp and Debug.h consistent. Rename SetCurrentDebugType;Chad Rosier2012-07-261-5/+5
| | | | | | | Function names should be camel case, and start with a lower case letter. No functional change intended. llvm-svn: 160813
* Use an otherwise unused variable.Jakob Stoklund Olesen2012-07-261-1/+1
| | | | llvm-svn: 160798
* Start scaffolding for a MachineTraceMetrics analysis pass.Jakob Stoklund Olesen2012-07-264-1/+726
| | | | | | | | | | | | | | | | | | | | | | | | This is still a work in progress. Out-of-order CPUs usually execute instructions from multiple basic blocks simultaneously, so it is necessary to look at longer traces when estimating the performance effects of code transformations. The MachineTraceMetrics analysis will pick a typical trace through a given basic block and provide performance metrics for the trace. Metrics will include: - Instruction count through the trace. - Issue count per functional unit. - Critical path length, and per-instruction 'slack'. These metrics can be used to determine the performance limiting factor when executing the trace, and how it will be affected by a code transformation. Initially, this will be used by the early if-conversion pass. llvm-svn: 160796
* Add a floor intrinsic.Dan Gohman2012-07-261-0/+5
| | | | llvm-svn: 160791
* do null checks for a few more Emit*() functions.Nuno Lopes2012-07-261-17/+15
| | | | | | Thanks Eli for noticing. llvm-svn: 160787
* Stop reassociate from looking through expressions of arbitrary complexity. ThisDuncan Sands2012-07-261-0/+2
| | | | | | is a temporary measure until my fix for PR13021 is ready. llvm-svn: 160778
* Make l/q suffixes on AVX forms of scalar convert instructions consistent ↵Craig Topper2012-07-261-12/+15
| | | | | | with their non-AVX forms. llvm-svn: 160775
* Fix call setup for PIC.Akira Hatanaka2012-07-262-6/+40
| | | | | | Patch by Reed Kotler. llvm-svn: 160774
* It's not safe to blindly remove invoke instructions. This happens when weNick Lewycky2012-07-251-1/+2
| | | | | | | encounter an invoke of an allocation function. This should fix the dragonegg bootstrap. Testcase to follow, later. llvm-svn: 160757
* You cannot call removeModule on a JIT with no modules. Patch by VerenaChad Rosier2012-07-251-1/+1
| | | | | | Beckham <verena@codeplay.com>. Reviewed by Jim Grosbach. llvm-svn: 160753
* revert r160742: it's breaking CMake buildNuno Lopes2012-07-252-22/+8
| | | | | | | original commit msg: MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings llvm-svn: 160751
* Disable rematerialization in TwoAddressInstructionPass.Manman Ren2012-07-251-78/+6
| | | | | | | | | | | It is redundant; RegisterCoalescer will do the remat if it can't eliminate the copy. Collected instruction counts before and after this. A few extra instructions are generated due to spilling but it is normal to see these kinds of changes with almost any small codegen change, according to Jakob. This also fixed rdar://11830760 where xor is expected instead of movi0. llvm-svn: 160749
* Don't add null characters to the end of the APFloat string buffer.David Blaikie2012-07-251-10/+2
| | | | | | Report/patch inspiration by Olaf Krzikalla. llvm-svn: 160744
* MemoryBuiltins: add support to determine the size of strdup'ed non-constant ↵Nuno Lopes2012-07-252-8/+22
| | | | | | strings llvm-svn: 160742
* add EmitStrNLen()Nuno Lopes2012-07-251-0/+27
| | | | llvm-svn: 160741
* Preserve 2-addr constraints in ConnectedVNInfoEqClasses.Jakob Stoklund Olesen2012-07-251-7/+4
| | | | | | | | | | | | | | | | | | | | When a live range splits into multiple connected components, we would arbitrarily assign <undef> uses to component 0. This is wrong when the use is tied to a def that gets assigned to a different component: %vreg69<def> = ADD8ri %vreg68<undef>, 1 The use and def must get the same virtual register. Fix this by assigning <undef> uses to the same component as the value defined by the instruction, if any: %vreg69<def> = ADD8ri %vreg69<undef>, 1 This fixes PR13402. The PR has a test case which I am not including because it is unlikely to keep exposing this behavior in the future. llvm-svn: 160739
* ARM: Don't assume an SDNode is a constant.Jim Grosbach2012-07-251-0/+4
| | | | | | | | | Before accessing a node as a ConstandSDNode, make sure it actually is one. No testcase of non-trivial size. rdar://11948669 llvm-svn: 160735
* Verify two-address constraints more carefully.Jakob Stoklund Olesen2012-07-251-14/+7
| | | | | | Include <undef> operands and virtual registers after leaving SSA form. llvm-svn: 160734
* make all Emit*() functions consult the TargetLibraryInfo information before ↵Nuno Lopes2012-07-255-64/+128
| | | | | | | | | creating a call to a library function. Update all clients to pass the TLI information around. Previous draft reviewed by Eli. llvm-svn: 160733
* Fix typos. Thanks to Matt Beaumont-Gay for noticing it.Rafael Espindola2012-07-251-3/+3
| | | | llvm-svn: 160731
* When a return struct pointer is passed in registers, the called has nothingRafael Espindola2012-07-252-12/+31
| | | | | | to pop. llvm-svn: 160725
* Factor a long list of conditions into a predicate function. No functionalityRafael Espindola2012-07-251-6/+15
| | | | | | change. llvm-svn: 160724
* When folding a load from a global constant, if the load started in the middleDuncan Sands2012-07-251-5/+8
| | | | | | | | | | of an array element (rather than at the beginning of the element) and extended into the next element, then the load from the second element was being handled wrong due to incorrect updating of the notion of which byte to load next. This fixes PR13442. Thanks to Chris Smowton for reporting the problem, analyzing it and providing a fix. llvm-svn: 160711
* Eliminate the stack slot used to save the global base register.Akira Hatanaka2012-07-254-59/+15
| | | | | | | | The long branch pass (fixed in r160601) no longer uses the global base register to compute addresses of branch destinations, so it is not necessary to reserve a slot on the stack. llvm-svn: 160703
* Fix a bug in the x86 disassembler's symbolic disassembly support for Jcc-JumpKevin Enderby2012-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | if Condition Is Met instuctions that was not correctly determining the target instruction. So for a jne rel32 instruction: % cat x.s .byte 0x0f, 0x85, 0x09, 0x00, 0x00, 0x00 % as x.s it was incorrectly deterining the target: % otool -q -tv a.out a.out: (__TEXT,__text) section 0000000000000000 jne 0xd and with the fix it gets this correct as: % otool -q -tv a.out a.out: (__TEXT,__text) section 0000000000000000 jne 0xf rdar://11505997 llvm-svn: 160694
* Don't delete one more instruction than we're allowed to. This should fix theNick Lewycky2012-07-241-1/+3
| | | | | | | Darwin bootstrap. Testcase exists but isn't fully reduced, I expect to commit the testcase this evening. llvm-svn: 160693
* add a few more functions to TargetLibraryInfo:Nuno Lopes2012-07-241-0/+7
| | | | | | fputc, memchr, memcmp, putchar, puts, strchr, strncmp llvm-svn: 160690
* ELF does not imply GNU/Linux. Do not assume GNU conventions just because weDavid Chisnall2012-07-241-1/+1
| | | | | | | | | are targeting an ELF platform. Only fold gs-relative (and fs-relative) loads if it is actually sensible to do so for the target platform. This fixes PR13438. llvm-svn: 160687
* TargetLibraryInfo: add strn?cat, strn?cpy, and strn?lenNuno Lopes2012-07-241-0/+6
| | | | llvm-svn: 160678
* teach objectsize about strdup() and strndup()Nuno Lopes2012-07-241-3/+16
| | | | llvm-svn: 160676
* Clean whitespaces.Nadav Rotem2012-07-2422-498/+500
| | | | llvm-svn: 160668
* Teach globalopt to not nuke all stores to globals. Keep them around of theyNick Lewycky2012-07-241-8/+177
| | | | | | | | | might be deliberate "one time" leaks, so that leak checkers can find them. This is a reapply of r160602 with the fix that this time I'm committing the code I thought I was committing last time; the I->eraseFromParent() goes *after* the break out of the loop. llvm-svn: 160664
* Change llvm_unreachable in SplitVectorOperand to report_fatal_error. Keeps ↵Craig Topper2012-07-241-1/+3
| | | | | | release builds from crashing if code uses an intrinsic with an illegal type. llvm-svn: 160661
* Fix function MipsCodeEmitter::emitExternalSymbolAddress to pass testAkira Hatanaka2012-07-241-1/+1
| | | | | | | | ExecutionEngine/test-fp.ll. Patch by Petar Jovanovic. llvm-svn: 160653
* Add basic ability to setup call frame, and make procedure calls.Akira Hatanaka2012-07-238-44/+287
| | | | | | | | Hello world will compile and execute with this patch. Patch by Reed Kotler. llvm-svn: 160651
* make ConstantRange::zeroExtend() optimalNuno Lopes2012-07-231-2/+6
| | | | llvm-svn: 160643
* An objc_retain can serve as a may-use for a different pointer.Dan Gohman2012-07-231-1/+4
| | | | | | rdar://11931823. llvm-svn: 160637
* Add comment for relocations MO_HIGHER and HIGHEST in MipsBaseInfo.h.Akira Hatanaka2012-07-231-0/+2
| | | | llvm-svn: 160636
* Test revert of test changes.Micah Villmow2012-07-231-1/+0
| | | | llvm-svn: 160632
* Test commit.Micah Villmow2012-07-231-0/+1
| | | | llvm-svn: 160631
* Suppress a warning.Nadav Rotem2012-07-231-1/+2
| | | | llvm-svn: 160629
* Fix a typo (the the => the)Sylvestre Ledru2012-07-2314-15/+15
| | | | llvm-svn: 160621
* Fixed DAGCombine optimizations which generate select_cc for targetsNadav Rotem2012-07-231-33/+47
| | | | | | | | | | that do not support it (X86 does not lower select_cc). PR: 13428 Together with Michael Kuperstein <michael.m.kuperstein@intel.com> llvm-svn: 160619
* Tidy up. Fix indentation and remove trailing whitespace.Craig Topper2012-07-231-16/+14
| | | | llvm-svn: 160617
* Change llvm_unreachable in SplitVectorResult to report_fatal_error. Keeps ↵Craig Topper2012-07-231-1/+2
| | | | | | release builds from crashing if code uses an intrinsic with an illegal type. For instance 256-bit AVX intrinsics without having AVX enabled. llvm-svn: 160616
OpenPOWER on IntegriCloud