diff options
author | Fangrui Song <maskray@google.com> | 2019-04-17 01:46:27 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-17 01:46:27 +0000 |
commit | e3576b0afab73c1b73038ce6c04392556511fb7e (patch) | |
tree | c6f47b9c9b4e58ff1596ce55f72f5ff36ed92aa0 /llvm/test/Transforms/LoopVectorize/AMDGPU/unroll-in-loop-vectorizer.ll | |
parent | ab70da07286e618016e78247e4a24fcb84077fda (diff) | |
download | bcm5719-llvm-e3576b0afab73c1b73038ce6c04392556511fb7e.tar.gz bcm5719-llvm-e3576b0afab73c1b73038ce6c04392556511fb7e.zip |
[Driver] Simplify -g level computation and its interaction with -gsplit-dwarf
Summary:
When -gsplit-dwarf is used together with other -g options, in most cases
the computed debug info level is decided by the last -g option, with one
special case (see below). This patch drops that special case and thus
makes it easy to reason about:
// If a lower debug level -g comes after -gsplit-dwarf, in some cases
// -gsplit-dwarf is cancelled.
-gsplit-dwarf -g0 => 0
-gsplit-dwarf -gline-directives-only => DebugDirectivesOnly
-gsplit-dwarf -gmlt -fsplit-dwarf-inlining => 1
-gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 + split
// If -gsplit-dwarf comes after -g options, with this patch, the net
// effect is 2 + split for all combinations
-g0 -gsplit-dwarf => 2 + split
-gline-directives-only -gsplit-dwarf => 2 + split
-gmlt -gsplit-dwarf -fsplit-dwarf-inlining => 2 + split
-gmlt -gsplit-dwarf -fno-split-dwarf-inlining => 1 + split (before) 2 + split (after)
The last case has been changed. In general, if the user intends to lower
debug info level, place that -g option after -gsplit-dwarf.
Some context:
In gcc, the last of -gsplit-dwarf -g0 -g1 -g2 -g3 -ggdb[0-3] -gdwarf-*
... decides the debug info level (-gsplit-dwarf -gdwarf-* have level 2).
It is a bit unfortunate that -gsplit-dwarf -gdwarf-* ... participate in
the level computation but that is the status quo.
Reviewers: dblaikie, echristo, probinson
Reviewed By: dblaikie, probinson
Subscribers: probinson, aprantl, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59923
llvm-svn: 358544
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/AMDGPU/unroll-in-loop-vectorizer.ll')
0 files changed, 0 insertions, 0 deletions