[llvm-dev] llc: Unknown command line argument '-debug-only=isel'
Leslie Zhai via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 21 16:06:34 PST 2017
在 2017年12月22日 01:14, Adrian Prantl 写道:
>
>> On Dec 21, 2017, at 7:46 AM, Francis Visoiu Mistrih via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Hi Leslie,
>>
>>> On 21 Dec 2017, at 15:14, Leslie Zhai via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>>
>>> Hi LLVM developers,
>>>
>>> llc -march=mips -debug-only=isel was able to work in Nov 8 2017 https://reviews.llvm.org/D39723
>>>
>>> But it doesn't work now:
>>>
>>> $ clang --version
>>> LLVM China clang version 6.0.0 (git at github.com:llvm-mirror/clang.git 9b7b03045ee9b5622028537266aafeb9ea218ac1) (git at github.com:llvm-mirror/llvm.git 3a26601a88394c02603b8756527c55df9ab94d78) (based on LLVM 6.0.0svn)
>>> Target: x86_64-redhat-linux
>>> Thread model: posix
>>> InstalledDir: /data/project/xiangzhai/llvm/build/./bin
>>> $ llc --version
>>> LLVM (http://llvm.org/):
>>> LLVM version 6.0.0svn
>>> Optimized build.
>> I see you’re running an optimized build.
>>
>> You need a debug build to use "-debug-only”. I suggest you take a look at include/llvm/Support/Debug.h and the `DEBUG` macro.
> You don't need a debug build for this to work, enabling assertions should be enough. Try ReleaseAssert or RelWithDebInfoAssert.
Works -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON
$ llc -march=riscv32 -debug-only=isel test/CodeGen/RISCV/calling-conv.ll
...
ISEL: Match complete!
===== Instruction selection ends:
Selected selection DAG: %bb.0 'caller_large_struct_ret:'
SelectionDAG has 20 nodes:
t0: ch = EntryToken
t4: ch,glue = ADJCALLSTACKDOWN TargetConstant:i32<0>,
TargetConstant:i32<0>, t0
t25: i32 = ADDI TargetFrameIndex:i32<0>, TargetConstant:i32<0>
t6: ch,glue = CopyToReg t4, Register:i32 %x10, t25
t9: i32 = LUI TargetGlobalAddress:i32<void (%struct.large*)*
@callee_large_struct_ret> 0 [TF=2]
t10: i32 = ADDI t9, TargetGlobalAddress:i32<void (%struct.large*)*
@callee_large_struct_ret> 0 [TF=1]
t12: ch,glue = PseudoCALL t10, Register:i32 %x10,
RegisterMask:Untyped, t6, t6:1
t13: ch,glue = ADJCALLSTACKUP TargetConstant:i32<0>,
TargetConstant:i32<0>, t12, t12:1
t16: i32,ch = LW<Mem:LD4[%2](align=8)(dereferenceable)>
TargetFrameIndex:i32<0>, TargetConstant:i32<0>, t13
t19: i32,ch = LW<Mem:LD4[%4](dereferenceable)>
TargetFrameIndex:i32<0>, TargetConstant:i32<12>, t13
t20: i32 = ADD t16, t19
t21: ch,glue = CopyToReg t13, Register:i32 %x10, t20
t22: ch = PseudoRET Register:i32 %x10, t21, t21:1
Total amount of phi nodes to update: 0
*** MachineFunction at end of ISel ***
# Machine code for function caller_large_struct_ret: IsSSA, TracksLiveness
Frame Objects:
fi#0: size=16, align=8, at location [SP]
%bb.0: derived from LLVM BB %0
ADJCALLSTACKDOWN 0, 0, implicit-def dead %x2, implicit %x2
%0:gpr = LUI target-flags(<unknown>) @callee_large_struct_ret;
GPR:%0
%1:gpr = ADDI killed %0, target-flags(<unknown>)
@callee_large_struct_ret; GPR:%1,%0
%2:gpr = ADDI %stack.0, 0; GPR:%2
%x10 = COPY %2; GPR:%2
PseudoCALL killed %1, <regmask %x1 %x3 %x4 %x8 %x9 %x18 %x19
%x20 %x21 %x22 %x23 %x24 %x25 %x26 %x27>, implicit-def dead %x1,
implicit %x10, implicit-def %x2; GPR:%1
ADJCALLSTACKUP 0, 0, implicit-def dead %x2, implicit %x2
%3:gpr = LW %stack.0, 12; mem:LD4[%4](dereferenceable) GPR:%3
%4:gpr = LW %stack.0, 0; mem:LD4[%2](align=8)(dereferenceable)
GPR:%4
%5:gpr = ADD killed %4, killed %3; GPR:%5,%4,%3
%x10 = COPY %5; GPR:%5
PseudoRET implicit %x10
# End machine code for function caller_large_struct_ret.
Thanks for your hint!
>
> -- adrian
>
>> Cheers,
>>
>> —
>> Francis
>>
>>> Default target: x86_64-redhat-linux
>>> Host CPU: broadwell
>>>
>>> llc: Unknown command line argument '-debug-only=isel'. Try: '/data/project/xiangzhai/llvm/build/bin/llc -help'
>>> llc: Did you mean '-debug-pass=isel'?
>>>
>>> I couldn't grep debug-only command flags or options via git log, please give me some hint, thanks a lot!
>>>
>>> --
>>> Regards,
>>> Leslie Zhai - https://reviews.llvm.org/p/xiangzhai/
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
--
Regards,
Leslie Zhai - https://reviews.llvm.org/p/xiangzhai/
More information about the llvm-dev
mailing list