- May 23, 2011
-
-
Chris Lattner authored
aligned. Teach memcpyopt to not give up all hope when confonted with an underaligned memcpy feeding an overaligned byval. If the *source* of the memcpy can be determined to be adequeately aligned, or if it can be forced to be, we can eliminate the memcpy. This addresses PR9794. We now compile the example into: define i32 @f(%struct.p* nocapture byval align 8 %q) nounwind ssp { entry: %call = call i32 @g(%struct.p* byval align 8 %q) nounwind ret i32 %call } in both x86-64 and x86-32 mode. We still don't get a tailcall though, because tailcalls apparently can't handle byval. llvm-svn: 131884
-
Chris Lattner authored
llvm-svn: 131883
-
Chris Lattner authored
llvm-svn: 131882
-
Chris Lattner authored
code generator will do it. With this patch, clang compiles the example in PR9794 to not have an alloca temporary. llvm-svn: 131881
-
Chris Lattner authored
when we're just going to throw the result away. No functionality change. llvm-svn: 131880
-
Chris Lattner authored
generator will give it something sufficient. This is important because the mid-level optimizer doesn't know what alignment is required otherwise. llvm-svn: 131879
-
Greg Clayton authored
of duplicated code from appearing all over LLDB: lldb::addr_t Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error); bool Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error); size_t Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error); size_t Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error); in lldb_private::Process the following functions were renamed: From: uint64_t Process::ReadUnsignedInteger (lldb::addr_t load_addr, size_t byte_size, Error &error); To: uint64_t Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Error &error); Cleaned up a lot of code that was manually doing what the above functions do to use the functions listed above. Added the ability to get a scalar value as a buffer that can be written down to a process (byte swapping the Scalar value if needed): uint32_t Scalar::GetAsMemoryData (void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Error &error) const; The "dst_len" can be smaller that the size of the scalar and the least significant bytes will be written. "dst_len" can also be larger and the most significant bytes will be padded with zeroes. Centralized the code that adds or removes address bits for callable and opcode addresses into lldb_private::Target: lldb::addr_t Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; lldb::addr_t Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; All necessary lldb_private::Address functions now use the target versions so changes should only need to happen in one place if anything needs updating. Fixed up a lot of places that were calling : addr_t Address::GetLoadAddress(Target*); to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress() as needed. There were many places in the breakpoint code where things could go wrong for ARM if these weren't used. llvm-svn: 131878
-
David Chisnall authored
llvm-svn: 131877
-
Chris Lattner authored
llvm-svn: 131876
-
Chris Lattner authored
llvm-svn: 131875
-
Chris Lattner authored
llvm-svn: 131874
-
Chris Lattner authored
llvm-svn: 131873
-
Chris Lattner authored
C99 runtimes don't have exp2). llvm-svn: 131872
-
Chris Lattner authored
header. Getting it in the wrong order generated incorrect line markers in -E mode. In the testcase from PR9861 we used to generate: # 1 "test.c" 2 # 1 "./foobar.h" 1 # 0 "./foobar.h" # 0 "./foobar.h" 3 # 2 "test.c" 2 now we properly produce: # 1 "test.c" 2 # 1 "./foobar.h" 1 # 1 "./foobar.h" 3 # 2 "test.c" 2 This fixes PR9861. llvm-svn: 131871
-
Chris Lattner authored
llvm-svn: 131870
-
- May 22, 2011
-
-
Jim Ingham authored
action the second time the event is removed (the first is the internal -> external transition, the second when it is pulled off the public event queue, and further times when it is put back because we are faking a stop reason to hide the expression evaluation stops. llvm-svn: 131869
-
Renato Golin authored
RTABI chapter 4.3.4 specifies __eabi_mem* calls. Specifically, __eabi_memset accepts parameters (ptr, size, value) in a different order than GNU's memset (ptr, value, size), therefore the special lowering in AAPCS mode. Implementation by Evzen Muller. llvm-svn: 131868
-
Charles Davis authored
of them, particularly the ones that don't take arguments. Also implement .seh_proc and .seh_handler. llvm-svn: 131866
-
Chris Lattner authored
llvm-svn: 131863
-
Chris Lattner authored
llvm-svn: 131862
-
Evan Cheng authored
llvm-svn: 131861
-
Chris Lattner authored
result is non-zero. Implement an example optimization (PR9814), which allows us to transform: A / ((1 << B) >>u 2) into: A >>u (B-2) which we compile into: _divu3: ## @divu3 leal -2(%rsi), %ecx shrl %cl, %edi movl %edi, %eax ret instead of: _divu3: ## @divu3 movb %sil, %cl movl $1, %esi shll %cl, %esi shrl $2, %esi movl %edi, %eax xorl %edx, %edx divl %esi, %eax ret llvm-svn: 131860
-
Johnny Chen authored
Modified the patch to .td file supplied by Jyun-Yan You. Add a test case and modified ARMDisassemblerCore.cpp a little bit. llvm-svn: 131859
-
Chris Lattner authored
failing to form a memset, then having to delete it" but my approximation isn't safe for self recurrent loops. Instead of doign a hack, just do it the right way. llvm-svn: 131858
-
Chris Lattner authored
llvm-svn: 131857
-
David Chisnall authored
Change the default for supporting ObjC GC to true. This shouldn't really be in ToolChain at all, since it's a property of the objc runtime library. llvm-svn: 131856
-
Frits van Bommel authored
Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this. llvm-svn: 131855
-
Chris Lattner authored
llvm-svn: 131854
-
Chris Lattner authored
llvm-svn: 131853
-
Howard Hinnant authored
llvm-svn: 131852
-
Chris Lattner authored
llvm-svn: 131851
-
Chris Lattner authored
llvm-svn: 131850
-
Chris Lattner authored
"stored once" even if its address is compared. llvm-svn: 131849
-
Caroline Tice authored
Change the command 'breakpoint command remove' to 'breakpoint command delete', to be more consistent with other commands. llvm-svn: 131848
-
Chris Lattner authored
causing it to get into infinite loops when it would widen a load (which can necessarily leave around dead loads). llvm-svn: 131847
-
Chris Lattner authored
llvm-svn: 131846
-
Chris Lattner authored
llvm-svn: 131845
-
Nick Lewycky authored
llvm-svn: 131844
-
Chris Lattner authored
llvm-svn: 131843
-
Chris Lattner authored
llvm-svn: 131842
-