[PATCH] D41762: [DWARF] Incorrect prologue end line record.
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 06:05:29 PST 2018
thegameg added a comment.
In https://reviews.llvm.org/D41762#1007199, @CarlosAlbertoEnciso wrote:
> In https://reviews.llvm.org/D41762#1006539, @thegameg wrote:
>
> > In https://reviews.llvm.org/D41762#1006344, @aprantl wrote:
> >
> > > IIUC, enabling/disabling shrink-wrapping does not move the prologue_end, so this LGTM.
> >
> >
> > If I understand the code <https://github.com/llvm-mirror/llvm/blob/7947e7211b5dd0cc9fc75359da8c73a2e913fe1a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L1256> correctly, in case of shrink-wrapping kicking in, `prologue_end` will be at the beginning of the function, while without shrink-wrapping, it will be at the end of the prologue. I believe that's correct, right?
>
>
> Hi,
>
> I tried your given test case with the same command line options and this is the assembler generated for both cases:
The difference here is the `push %rax`.
> clang -O1 -S -g -o - foo.c
In this case, the push (the prologue) is in `bb.1`, after the cmp.
> clang -O1 -S -g -o - foo.c -mllvm -enable-shrink-wrap=false
In this case, the push (the prologue) is in `bb.0`, before the cmp.
> I noticed that the code generation does not look similar to your posting specially for the case when -enable-shrink-wrap=false.
Yes, sorry, you should be able to achieve the same result with `-fno-omit-frame-pointer` in both commands.
> May be we are using different compilers. My version is revision 325102 plus the submitted changes for the review.
My bad, I should have provided the correct triple: `-target x86_64-apple-darwin`.
https://reviews.llvm.org/D41762
More information about the llvm-commits
mailing list