summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Move the initialization of the bounds checking pass. The pass itselfChandler Carruth2012-07-222-3/+3
| | | | | | moved earlier. This fixes some layering issues. llvm-svn: 160611
* ExecutionEngine/TargetSelect.cpp: Override default triple as LLVM_HOSTTRIPLE.NAKAMURA Takumi2012-07-221-1/+1
| | | | | | In current implementation, JIT should run only on host. llvm-svn: 160610
* Revert r160602.Nick Lewycky2012-07-211-177/+8
| | | | llvm-svn: 160603
* Teach globalopt to play nice with leak checkers. This is a reapplication ofNick Lewycky2012-07-211-8/+177
| | | | | | | | r160529 that was subsequently reverted. The fix was to not call GV->eraseFromParent() right before the caller does the same. The existing testcases already caught this bug if run under valgrind. llvm-svn: 160602
* Fix Mips long branch pass.Akira Hatanaka2012-07-212-131/+136
| | | | | | | This pass no longer requires that the global pointer value be saved to the stack or register since it uses bal instruction to compute branch distance. llvm-svn: 160601
* Add HIGHER and HIGHEST relocations to Mips backend.Akira Hatanaka2012-07-213-1/+8
| | | | llvm-svn: 160599
* Revert accidental commit.Akira Hatanaka2012-07-218-288/+45
| | | | llvm-svn: 160598
* Add VK_Mips_HIGHER and VK_Mips_HIGHEST to MCSymbolRefExpr::VariantKind.Akira Hatanaka2012-07-219-45/+290
| | | | | | Test case will be added later when long branch patch is checked in. llvm-svn: 160597
* baby steps toward fixing some problems with inbound GEPs that overflow, as ↵Nuno Lopes2012-07-201-1/+1
| | | | | | | | discussed 2 months ago or so. Make sure we do not emit index computations with NSW flags so that we dont get an undef value if the GEP overflows llvm-svn: 160589
* move the bounds checking pass to the instrumentation folder, where it ↵Nuno Lopes2012-07-203-2/+2
| | | | | | | | belongs. I dunno why in the world I dropped it in the Scalar folder in the first place. No functionality change. llvm-svn: 160587
* Remove unused private member variables uncovered by the recent changes to ↵Benjamin Kramer2012-07-205-21/+3
| | | | | | clang's -Wunused-private-field. llvm-svn: 160583
* Avoid folding loads that are unsafe to move.Jakob Stoklund Olesen2012-07-201-0/+13
| | | | | | | | | | LiveRangeEdit::foldAsLoad() can eliminate a register by folding a load into its only use. Only do that when the load is safe to move, and it won't extend any live ranges. This fixes PR13414. llvm-svn: 160575
* Fix a dangling StringRef bug in the auto upgrader. In one case, we resetChandler Carruth2012-07-201-2/+2
| | | | | | | | | | | CI's name, and then used the StringRef pointing at its old name. I'm fixing it by storing the name in a std::string, and hoisting the renaming logic to happen always. This is nicer anyways as it will allow the upgraded IR to have the same names as the input IR in more cases. Another bug found by AddressSanitizer. Woot. llvm-svn: 160572
* Split loop exiting edges more aggressively.Jakob Stoklund Olesen2012-07-201-13/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHIElimination splits critical edges when it predicts it can resolve interference and eliminate copies. It doesn't split the edge if the interference wouldn't be resolved anyway because the phi-use register is live in the critical edge anyway. Teach PHIElimination to split loop exiting edges with interference, even if it wouldn't resolve the interference. This removes the necessary copies from the loop, which is still an improvement from injecting the copies into the loop. The test case demonstrates the improvement. Before: LBB0_1: cmpb $0, (%rdx) leaq 1(%rdx), %rdx movl %esi, %eax je LBB0_1 After: LBB0_1: cmpb $0, (%rdx) leaq 1(%rdx), %rdx je LBB0_1 movl %esi, %eax llvm-svn: 160571
* Try to unbreak the windows build.Benjamin Kramer2012-07-201-1/+1
| | | | llvm-svn: 160567
* SourceMgr: Use has_colors() instead of just is_displayed() before trying to useDaniel Dunbar2012-07-201-2/+2
| | | | | | color. llvm-svn: 160559
* raw_ostream: Add a has_colors() method.Daniel Dunbar2012-07-201-0/+4
| | | | llvm-svn: 160558
* Process: Add sys::Process::FileDescriptorHasColors().Daniel Dunbar2012-07-202-10/+16
| | | | llvm-svn: 160557
* Fix assertion in jump threading (PR13405).Richard Osborne2012-07-201-0/+2
| | | | | | | | GetBestDestForJumpOnUndef() assumes there is at least 1 successor, which isn't true if the block ends in an indirect branch with no successors. Fix this by bailing out earlier in this case. llvm-svn: 160546
* [asan] make sure that the crash callbacks do not get merged (Chandler's ↵Kostya Serebryany2012-07-201-4/+16
| | | | | | idea: insert an empty InlineAsm). Change the order in which the new BBs are inserted: the slow path BB is insert between old BBs, the crash BB is inserted at the end. Don't create an empty BB (introduced by recent commits). Update the test. The experimental code that does manual crash callback merge will most likely be deleted later. llvm-svn: 160544
* Don't use implicit register operands to calculate L-bit for AVX ↵Craig Topper2012-07-201-0/+2
| | | | | | instructions. Needed because super reg defs and kills are added as implicit operands on 128-bit instructions. Fixes PR13349. Patch by Jose Fonseca. llvm-svn: 160543
* Revert r160529 due to crashes.Nick Lewycky2012-07-191-171/+8
| | | | llvm-svn: 160532
* Fix crash in machine verifier when trying to print the def of a register ↵Pete Cooper2012-07-191-0/+2
| | | | | | which has no def llvm-svn: 160531
OpenPOWER on IntegriCloud