Results 1 -
4 of
4
BPF+: Exploiting Global Data-flow Optimization in a Generalized Packet Filter Architecture
- In SIGCOMM
, 1999
"... A packet filter is a programmable selection criterion for classifying or selecting packets from a packet stream in a generic, reusable fashion. Previous work on packet filters falls roughly into two categories, namely those efforts that investigate flexible and extensible filter abstractions but sac ..."
Abstract
-
Cited by 53 (0 self)
- Add to MetaCart
A packet filter is a programmable selection criterion for classifying or selecting packets from a packet stream in a generic, reusable fashion. Previous work on packet filters falls roughly into two categories, namely those efforts that investigate flexible and extensible filter abstractions but sacrifice performance, and those that focus on low-level, optimized filtering representations but sacrifice flexibility. Applications like network monitoring and intrusion detection, however, require both high-level expressiveness and raw performance. In this paper, we propose a fully general packet filter framework that affords both a high degree of flexibility and good performance. In our framework, a packet filter is expressed in a high-level language that is compiled into a highly efficient native implementation. The optimization phase of the compiler uses a flowgraph set relation called edge dominators and the novel application of an optimization technique that we call "redundant predicate...
Improving Performance By Branch Reordering
, 1998
"... ix 1 INTRODUCTION 1 2 RELATED WORK 6 3 DETECTING A SEQUENCE OF REORDERABLE BRANCHES 9 3.1 Detecting a Sequence of Reorderable Branches with a Common Successor : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 3.2 Detecting a Sequence of Reorderable Range Conditions Comparing a Common ..."
Abstract
-
Cited by 11 (4 self)
- Add to MetaCart
ix 1 INTRODUCTION 1 2 RELATED WORK 6 3 DETECTING A SEQUENCE OF REORDERABLE BRANCHES 9 3.1 Detecting a Sequence of Reorderable Branches with a Common Successor : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 3.2 Detecting a Sequence of Reorderable Range Conditions Comparing a Common Variable to Constants : : : : : : : : : : : : : : : 15 4 HANDLING SIDE EFFECTS IN A COMMON VARIABLE SEQUENCE 22 5 PERFORMING PROFILING 28 5.1 Producing Profile Information for Common Successor Sequence : 28 5.2 Producing Profile Information for Common Variable Sequence : 33 iv 6 SELECTING THE ORDERING OF BRANCHES 37 6.1 Selecting the Order of a Sequence of Branches with Common Successors : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38 6.2 Selecting the Order of a Sequence of Range Conditions Comparing a Common Variable : : : : : : : : : : : : : : : : : : : : : : : 40 7 IMPROVING THE SELECTED SEQUENCE OF RANGE CONDITIONS 46 8 APPLYING THE REORDERING TRANSFORMATION 49 9 RES...
Efficient and effective branch reordering using profile data
- ACM Transactions on Programming Languages and Systems (TOPLAS
, 2002
"... The conditional branch has long been considered an expensive operation. The relative cost of conditional branches has increased as recently designed machines are now relying on deeper pipelines and higher multiple issue. Reducing the number of conditional branches executed often results in a substan ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
The conditional branch has long been considered an expensive operation. The relative cost of conditional branches has increased as recently designed machines are now relying on deeper pipelines and higher multiple issue. Reducing the number of conditional branches executed often results in a substantial performance benefit. This paper describes a code-improving transformation to reorder sequences of conditional branches that compare a common variable to constants. The goal is to obtain an ordering where the fewest av erage number of branches in the sequence will be executed. First, sequences of branches that can be reordered are detected in the control flow. Second, profiling information is collected to predict the probability that each branch will transfer control out of the sequence. Third, the cost of performing each conditional branch is estimated. Fourth, the most beneficial ordering of the branches based on the estimated probability and cost is selected. The most beneficial ordering often includes the insertion of additional conditional branches that did not previously exist in the sequence. Finally, the control flow isrestructured to reflect the new ordering. The results of applying the transformation are on average reductions of about 8% fewer instructions executed and 13 % branches performed, as well as about a 4 % decrease in execution time.
Engelen, R.: Branch elimination by condition merging
, 2003
"... Conditional branches are expensive. Branches require a significant percentage of execution cycles since they occur frequently and cause pipeline flushes when mispredicted. In addition, branches result in forks in the control flow, which can prevent other code-improving transformations from being app ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Conditional branches are expensive. Branches require a significant percentage of execution cycles since they occur frequently and cause pipeline flushes when mispredicted. In addition, branches result in forks in the control flow, which can prevent other code-improving transformations from being applied. In this paper we describe profile-based techniques for replacing the execution of a set of two or more branches with a single branch on a conventional scalar processor. These sets of branches can include tests of multiple variables. For instance, the test if (p1! = 0 & & p2! = 0), which is testing for NULL pointers, can be replaced with if (p1 & p2! = 0). Program profiling is performed to target condition merging along frequently executed paths. The results show that eliminating branches by merging conditions can significantly reduce the number of conditional branches executed in non-numerical applications. key words: compiler, condition merging, profiling, code duplication

